LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I combine a ton of strings into an object so that it's easy to have all of them at hand?


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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 15
(972 Views)

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:

 

writetoconfigsnip.png

 

 

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!

0 Kudos
Message 12 of 15
(962 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 15
(957 Views)

@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>   ---'


0 Kudos
Message 14 of 15
(949 Views)

You can bundle all and either use the OpenG Write cluster to ini, or flatten it to xml and write that. 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 15 of 15
(930 Views)