ArcCAM

 From:  Michael Gibson
11543.57 In reply to 11543.56 
Hi Len, yes the normal behavior is that UI controls save and restore their last used values within the same program run but not between program runs.

The reason for that is to avoid the problem where someone who is learning MOI experiments with changing some options and then gets confused when their UI has different behavior than what is shown when they are following a tutorial.

If you want them to persist between program runs then you would need to do that with your own script code calling moi.command.getOption() / setOption() with the "to ini" parameter set to true. That will store the value in the [Commands] section of the moi.ini file.


> but I did test to see if it would work, and it doesnt appear to.

Can you post the code you tried that did not work? If the option hasn't been stored there yet it will throw an exception from getOption() so you need to have it set in a try {} catch {} block.

- Michael