Hi all,
Using LabVIEW and Application Builder 7.1 here. One thing I miss is the ability to tell the VI to remember the default values for my front panel objects. My solution to get around this is to write a config file and read the config file at the beginning of the VI and then pass the values from the config file to the variables and then write any changes at the end of the VI's execution pattern. Now what I also want to do is to have some variables accessible from a "Preferences" window that pops up similair to most applications. This is very easy to do, but once again this variables lose their values and need to be loaded for disk. A third hurdle is some of my SubVIs are 4 or 5 VIs deep and they need access to variables at the top level, so passing through all those layers to pass data becomes very messy. My solution was to use a global variable and when the Main starts it will load the config values and write them to the global variable to give every VI access, I'm passing fairly constant data, such as COM ports and such, so I think I'm avoiding the bad programming practices that come into play with Global VIs. Now my problem is I have to have a segment of code for each variable reading, then passing it to the variable in LabVIEW, then writing it at the end. So that's 3 segments of code for each variable I wish to preserve through the config file. Is there an easier way of doing this?
Regards,
Ken