LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting data type of cluster elements

How do I get the data type of a cluster element. I know how to tell if it's a string/number/etc by casting it to GObject and then getting the class-ID, but how do I tell the difference between an EXT,DBL,SGL,etc... There must be some other property?

Perhaps I have to cast it to a numeric and then there is a type property? Running LabView 6i.

Thanks.
0 Kudos
Message 1 of 5
(5,044 Views)
Might not be the best solution, but it works for most digital representations.

Check out the application note: Programming Reference Manual

-Joe
0 Kudos
Message 2 of 5
(5,044 Views)
That will work, but only if you already have the cluster by value (in which case, why would you need the type?). You can use the type descriptor property of the controls if you're working with a reference to a cluster. The LabVIEW Data Storage Tutorial is a good reference. I've attached an example in 6.1
0 Kudos
Message 3 of 5
(5,044 Views)
This method is certainly better in this case. Thanks.

-Joe
0 Kudos
Message 4 of 5
(5,044 Views)
Here's the answer from an NI engineer, basically doing what some of you guys said. Nice and simple I guess, and it's exactly what I wanted.
Download All
0 Kudos
Message 5 of 5
(5,044 Views)