03-26-2014 08:22 AM
It is possible to loop through the labels of a cluster like this:
However, this requires me to manually maintain the strings in the case structure.
Is there a way to get those cluster labels into the case structure at design time, similar to using an enum? They're right there!
Solved! Go to Solution.
03-26-2014 08:52 AM
Unfortunately not.
You may want to think of using a different data structure. If they are all the same data type, maybe an array would work better for you.
Another method would be to use Variant Attributes to hold the items in your cluster. You can lookup items in a variant by name that way.
03-26-2014 12:40 PM
I'll just use a typedef'ed enum and keep it in sync with the cluster labels by hand.
Would either of the other two solutions you mentioned would solve the labeling problem? Can you retrieve the labels of an array of controls at design time? Don't they all have to be the same, anyway?
03-26-2014 01:06 PM
I really hate it when we say "You can't do that in LabVIEW"
The workaround is to not use the labels. That's what Captions are for!
(Those vis you don't recognize are from Darren's Hidden Gems package)