08-24-2015 01:26 PM - edited 08-24-2015 01:26 PM
optoelectro wrote: Ah, in the first thing you quoted, I was referring to his VI where his references actually weren't connected to the controls.
Do you know if it's possible to have the property node value connect to the value input of the Write to Config File VI if I haven't defined the type of property node?
Actually, that is just the snippet tool being stupid. It should look more like this
Your Label.TXT property should be going to the key input on the Write To Config File. Once you wire up the reference to the property node, it will be just fine.
08-24-2015 01:41 PM
Hi Crossrulz, thanks, that's actually what I had in my VI (the references to the controls).
However, the part I'm confused on is this, let me try and post a VI snippet:
Basically some of my inputs will be arrays of strings and others will be arrays of doubles, and I'd like it to write either. I guess I can just create two VI's, one for each possibility. But is there a way to make it accept either? thanks!
08-24-2015 02:09 PM
Ah, you are getting into the interesting parts. You will technically need a case structure for each type of control you have and then type cast to the right type can then you can write to the config file.
But remember back when I just said to use the OpenG functions? You'd be done now if you had just used those. They take care of all of this for you, event arrays and clusters.
08-24-2015 02:14 PM
@crossrulz wrote:
OpenG has the Write Panel To INI.vi and Read Panel From INI.vi all ready for you to use. Dirt simple to use.
This VI is great, but the only problem I have with it is that it saves ALL control and indicator values. This doesn't go down so well when you have images on your front panel. I end up editing the OpenG VI to filter out specific labels that I don't want to save.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-24-2015 05:48 PM
You can bundle all and either use the OpenG Write cluster to ini, or flatten it to xml and write that.
/Y