LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

index enumerate variable

I have an enumerate variable, and I want to get the
"value" "string ?" index by an integer. Example,
I have a variable enumerate with A in the first entry,
B in the second entry, C in the third entry, and I want to be able to get the "value" C when I give 3.
How can I do this ?
Than.
0 Kudos
Message 1 of 4
(3,161 Views)
You can use String[] property node of the Enum with Search 1D Array function. The 1D array input will be your Enum string, then the value you want to search for will be wired to the element input.
0 Kudos
Message 2 of 4
(3,161 Views)
Is this what you are looking for?


rgds
ian
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 3 of 4
(3,161 Views)
You can typecast an unsigned interger to an enum using an enum constant and then wire that to the input of Format Into String. The output is a string containing the text of the enum value.

I probably didn't explain that very well. See the attached VI.

Kelly Bersch
Anadigm
Message 4 of 4
(3,161 Views)