LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Variant to Data question

This is a LV6.1 question. For an application I'm debugging, flatten data is
being used on a menu ring control. The menu ring data is unflattened using
Variant to Data. What I get back from the unflatten process is the numeric value
of the menu rings index, which is what I would expect, no problem there.
What I'd like to also get back from the unflatten process, would be the
string array of names for the menu ring that was flattened. Can someone
suggest how I can do this?
0 Kudos
Message 1 of 2
(2,553 Views)
The data is only the number of the element chosen (a blue wire) and not any more data about the element. To get the list of strings you should use the Strings[] property node. Then, you can flatten and save that array.
 
Another option is to pass (or obtain) the reference to the ring to whereever you're using it and then use a property node to extract the data you need.
 
A third option is to use an enum which keeps the data inside the wire, but that means you will need to have the exact same enum on the other side (which means it probably won't help you). You can do this by making the enum a typedef.
 
What are you trying to accomplish?

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,547 Views)