LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cluster names and data types

I'm trying to get the names AND data types of the items in a cluster. I've got the names OK, but I'm struggling to get the data types. I've tried the Label.ClassName property, but it only seems to return "text", regardless of data type. I'm probably being very dim, but I'm not sure what else to try.

In the example attached, I would expect the "Data Types" array to contain something like "Integer, Integer, Text, Double", but it comes out as "Text,Text,Text,Text"

Cheers

Joolz
0 Kudos
Message 1 of 6
(3,171 Views)
Hi Joolz,

You need to use the ClassName property not the LabelClassName as labels are text.

Hope this helps,

Nick
0 Kudos
Message 2 of 6
(3,171 Views)
Sorry Joolz,

Meant to attach your vi I've modified. Here it is...

NIck
0 Kudos
Message 3 of 6
(3,171 Views)
Yes, I thought I was being thick, and I was right! Many Thanks
Joolz

"For I am a Bear of Very Little Brain, and long words Bother me."
0 Kudos
Message 4 of 6
(3,171 Views)
Nick,

When I run the vi you posted, all I get back is either "Digital" or "String".

Shouldn't I get "Unsigned Long", "Unsigned Long", "String", "Double"?

dgw
0 Kudos
Message 5 of 6
(3,171 Views)
Joolz,

In LV7 (don't know about LV6.1) get the Value property and feed it to the VI located at \vi.lib\utility\GetType.llb\Get Type of Variant.vi. The output is an enum with the data type.

If the VI is not in LV6.1 then it is time for yet another shameless plug for the LabVIEW Data Tools in the OpenG Toolkit at OpenG.org and use Get TDEnum from Data.


LabVIEW, C'est LabVIEW

0 Kudos
Message 6 of 6
(3,171 Views)