LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exacting data from variant

Solved!
Go to solution

 

 

 

 

What I get as an output is

 

 

The issue is that I would like simply the text in quotations. Most ways I've attempted to do this (flatten to string) or grab from properity nodes isn't working.

 

Any suggestions?

 

(The goal is to automatically load/unload clusters without carring about what they store internally).

0 Kudos
Message 1 of 5
(2,758 Views)

@Valarauca wrote:

 

(The goal is to automatically load/unload clusters without carring about what they store internally).


Are you trying to simply get the name of all controls in a particular cluster?  If so, I would suggest using property nodes as shown below.

 

Unload.png

 

If this is not what you are trying to do please explain what you are trying to do.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 5
(2,742 Views)

The issue is that a clusters connecting to a subVI check that

 

Cluster wired and cluster input have the same data model (or something similiar to this), I cannot make this garentee. Otherwise your system would work.

 

My input is a variant, not a cluster. (Well it is a cluster, that has been flattened to a variant, because my goal is to not force 1 type of cluster will always be used).

0 Kudos
Message 3 of 5
(2,732 Views)
Solution
Accepted by topic author Valarauca

What you need is the datatype of the control, not its label. This vi is probably what you need: GetTypeInfo.vi from the vi.lib -> utility -> VariantDataType folder.

 

ScreenShot011.png

 

ben64

Message 4 of 5
(2,715 Views)

Using the VIs from the same library you can validate the cluster elements datatypes by doing something like this:

 

Validate Cluster Elements Type.png

 

Ben64

0 Kudos
Message 5 of 5
(2,703 Views)