command/script

 From:  Michael Gibson
2137.2 In reply to 2137.1 
Hi Burr,

> Would I lose anything by running a "Command" with the script process.

Yeah, there are a variety of thing that happen when code is run as a command rather than as an immediate script.

Probably the most noticeable will be that any companion .htm UI file that goes along with the script code is only automatically loaded and displayed for commands, not for an immediate script.

Another one is that undo unit creation is tied to a command starting and exiting, so if you try to create or remove data outside of a command, the automatic undo unit creation will not happen there.

There are various kinds of cleanup steps that won't happen, like the display of points that were picked inside the command will not be cleared.

Immediate scripts are meant to be things that alter stuff like display options, or help you select things, things that have an immediate reaction like that. Not really as things that require multiple stages of picking points and creating objects. Code that does that kind of processing should be run as a command instead of as an immediate script.

- Michael