LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve the selected text from an ENUM, text ring or other control

Hi and thanks for reading.

I want to be able to select a line of text from a menu, and place that text
in a string variable. This seems simple but I haven't found the solution.
I don't want to have to wire a numeric output to a case statement, thus
having to type the text line twice

Stan
0 Kudos
Message 1 of 4
(2,385 Views)
First create a property node of the enum,text ring, etc. Select the "Strings[] property. Use this as the Input Array input of an Index Array function. Wire the control to the Index input of the Index Array. The ouput of Index Array will be the text of the control.
0 Kudos
Message 2 of 4
(2,385 Views)
Apart from the String[] property already suggested, for an enum you have the additional option to read the control and feed it to a "Format into String" node with %s format.


LabVIEW, C'est LabVIEW

Message 3 of 4
(2,385 Views)
Please reply to mailto://stan.cehonski@lmco.com


"KB2WEN" wrote in message
news:aa90lh$36t$1@knight.vf.lmco.com...
> Hi and thanks for reading.
>
> I want to be able to select a line of text from a menu, and place that
text
> in a string variable. This seems simple but I haven't found the solution.
> I don't want to have to wire a numeric output to a case statement, thus
> having to type the text line twice
>
> Stan
>
>
0 Kudos
Message 4 of 4
(2,385 Views)