The script for chain

 From:  Michael Gibson
6087.59 In reply to 6087.58 
Hi Brian, you probably want to avoid calling .commit() on the various in-between factories. For a regular command, factory.commit() signals to the factory that the command has completely finished and the factory is completely done, once you call .commit() any further call to .cancel() won't do anything. Basically .commit() and .cancel() are mutually exclusive to one another.

Also any factory that has been created during a command goes on the "active factory list", and if the command ends without .commit() ever getting called, it will get automatically canceled during the command end cleanup processing. Either a .commit() or a .cancel() will pull that factory off of the active factory list, since it's considered to be completed after either of those calls.

So anyway probably if you just don't call .commit() for the things you don't want to persist in the geometry database that may cover it.

Otherwise if you do call .commit() you will have to manually remove things you don't want from the geometry database.

If you want to have factories remove the stuff they were showing in response to .update(), you can either call .cancel() on them if you're going to still be running the command (like for parameters changing), or if the command is ending you can actually just not do anything and then .cancel() gets called automatically for any active factory at the command end.

Does that make sense? Let me know if you are still having problems.

- Michael