LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Current Values as Default in Stand-Alone Application ?

Hi

I have a stand-alone application using LabVIEW run-time and I want the user to be able to make the choice if he wants to retain the default values or modify them ? I know you can't use the invoke node and set the current values to default because that works only in EDIT mode. I saw some postings where there was a talk about using configuration VIs. I am not sure how to use them. Also is there some other way I can accomplish this ?

Thanks
Sridhar

P.S: I use LabVIEW 7.0

Kudos are the best way to say thanks 🙂
0 Kudos
Message 1 of 3
(2,261 Views)
I would use a configuration file to hold default values for my controls. When the vi starts, prompt the user to select default values or to modify. You can use a two button dialog to do this. Wire the output to a case structure. If the user selects default, read the config file and use the values to set your controls values. If the user selects modify, call a subvi that gives the user an interface to modify the values. You can start with the old default values. This subvi would have a loop, waiting for the user to press either a cancel button or a change button. If the user makes changes and presses the change button, exit the loop and write these new values to the config file. If cancel is selected, exit the loop and do not write to the config file. Upon returning to the main, read the config file and set the control values accordingly. You can even go a step further and create a "factory default" file. This file would be read only. The user can be given a choice to select this file in case he made changes and saved them to the config file, and the new changes were all screwed up.
Config files are nothing more than a file containing keys which represents controls, and the data values for those controls. There are examples located at \examples\file\config.llb.
- tbob

Inventor of the WORM Global
Message 2 of 3
(2,257 Views)
Thank you so much. Your reply was very clear and I completely follow it. Thanks again !

Kudos are the best way to say thanks 🙂
0 Kudos
Message 3 of 3
(2,250 Views)