LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what is my variable?

If I have a say string control, is there something like a property node that outputs a word that indicates that the control is a string?
0 Kudos
Message 1 of 15
(3,561 Views)
"ClassName"


Message Edited by smercurio_fc on 05-12-2008 11:20 AM
0 Kudos
Message 2 of 15
(3,560 Views)
Thanks. The people on this board often know more than tech support.

Next question. Both floating point and integers have a class name as digital. Is it possible to differentiate one from the other?
0 Kudos
Message 3 of 15
(3,548 Views)
Property Display Format
0 Kudos
Message 4 of 15
(3,541 Views)
You basically need to look at the Type Descriptor information which you can get by converting the control to a variant, or you can use the Flatten To Sting function, with it changed to "Convert 7.x Data". Or, the easiest way is to use the OpenG function Get TDEnum From Data.
0 Kudos
Message 5 of 15
(3,538 Views)
Thanks again.
0 Kudos
Message 6 of 15
(3,535 Views)

@exo wrote:
Property Display Format

I'm not sure what you're referring to here. The format of how you display something does not affect the underlying datatype.
0 Kudos
Message 7 of 15
(3,534 Views)
I was pointing out a way of differentiating what the control or indicator is. I have to pass a variable to a Call Library Function. The function writes to a file but I have to maintain the format, string, integer, floating point.
In the framework (dll to window's users) I can make the variable a void * but I still need to tell the framework what type of variable so that it can call the right routine.
0 Kudos
Message 8 of 15
(3,530 Views)
Errr...  ok. Well, that OpenG function returns an enum, which I guess you can just treat as an integer. I assume that will work for you.
0 Kudos
Message 9 of 15
(3,521 Views)
You need to be careful about assuming data type based on Display Format.  It can't distinguish data type.  It just tells you how it is displayed.  You can have a DBL that has a display format of %d or an integer with a display format of %f.  Even if you don't have any unusual display formats, it still can't tell you a DBL from a SGL or a U8 from an I32.


Message Edited by Matthew Kelton on 05-12-2008 11:58 AM
0 Kudos
Message 10 of 15
(3,520 Views)