12-22-2010 04:56 AM
I want to be able to save and set control values that are saved (XML). I have my controls on about 5 sub vi's. So I thought it'd be a good idea
to put all the control references in a cluster from the several sub vi's and save and read from one point.
I can get the cluster values (i.e. the references to the controls), but how to proceed from here? If somebody has a better idea it is very welcome.
I have also read Ben's nugget here, but it deals with references to controls in a cluster, not references to a reference of a control in a cluster 🙂
12-22-2010 05:13 AM
You want to set the controls to a certain value obtained from the XML...?. Is that right or You want to do something else....? One thing I want to get cleared you are having Cluster of Reference or Reference to the Cluster of Reference....?
12-22-2010 05:32 AM
Actually I am putting the control references now directly into a functional global, which leaves me with an array of references. I think with this I can now acces control
properties from the control over all sub vi's and save data to file.
For example, I want the user to be able to switch language and hence change control captions.
12-22-2010 06:52 AM
Yes you can do so by the unbundle function and access each property of each control...
12-22-2010 07:51 AM
Thank you for reading that Nugget!
I use a GUI Controller in many apps so I can grab refs in sub-VI's.
Here are some screen shots of them in use.
The first "GUI Cnt" is a wrapper around the AE and invokes the action "Set Analysis mode" then another call let me get a cluster of the refs so I can choose based on the name.
This image shows what that action does.
THis is what happens when going into collection mode.
That is a small set of what you will find in my image gallery Feel free to browse (yes I know there is a lot of Olivia in there ) and ask if anything catches your interest.
Ben
12-22-2010 09:41 AM
I like your error combiners Ben, very neat
very much off topic, but:
I noticed you unbundled each item with a sepertate Unbundle - for neatness. Is there any expense to that, as opposed to unbunding in one Unbudle?
12-22-2010 09:46 AM - edited 12-22-2010 09:53 AM
@broken Arrow wrote:
I like your error combiners Ben, very neat
very much off topic, but:
I noticed you unbundled each item with a sepertate Unbundle - for neatness. Is there any expense to that, as opposed to unbunding in one Unbudle?
One of those sub-VIs is called "Error Fork Stacker" and is Open source and posted by Mike Porter in this thread. I will leave it as an exercise to the reader to create the other version .
The sepearte unbundles are not any less expensinve than a single unbundle node. I also use sepearte unbundles for "documentation" purposes since it puts a nice offical lable right next the the node.
Ben