Hi John,
Well, it would be nice if a VI could save itself, but unfortunately,
that's a limitation in LabVIEW since you can only programmatically save
a VI that is not running. However, using VI Server you can get around
this limitation by using a "Launcher" VI that makes the current values
default and then saves the VI. Here's an example of such a caller:
Notice that it is not possible to only make certain values default
while keeping others - you can only choose to make ALL values default
using this method.
Of course, you can also use the method discussed earlier, to save your
values in a file. I have created a small VI called "GetSetCtrls.vi"
that you can drop different places in your VI to load and save
control/indicator values. Here's the diagram of "GetSetCtrls.vi":
Currently "GetSetCtrls.vi" handles ALL existing controls and
indicators, so if you only want to control a few, please make the
necessary changes to the code yourself, thanks.
Have Fun!
Message Edited by Philip C. on 09-01-2005 01:05 AM
- Philip Courtois, Thinkbot Solutions