There are several methods to obtain both string indications of all items of an enum, as well as determining only the currently selected item.Method 1: Property Node with an Enum Control or IndicatorIn case an enum control or indicator exists, create a Property Node for the enum and select the RingText.Text property. This property returns the currently selected item as a string.Method 2: Property Node with an Enum Control or IndicatorThis method is the same as method 1, except that it uses a Reference to define which Control/Indicator to use. You can create a Reference by right-clicking a Control's/Indicator's terminal on the Block Diagram and selecting Create » Reference.Method 3: Property Node with an Enum Control or IndicatorIn case an enum control or indicator exists, create a Property Node for the enum (like in method 1 or 2) and select the Strings property. This property returns an array of strings for all items of the specified enum. In case you want to pick only the currently selected one, use the Index Array function with the enum wired to the index terminal to access the desired string.Please be advised that Property Nodes do not work with constants on the Block diagram. The previously mentioned methods do therefore not work with constants. The following two methods whatsoever work with enum constants as well.Method 4: Format Into String with an Enum Constant, Control, or IndictatorWire the enum to the Format Into String function input, with a format string value of %s wired to the format string input. This function will return the string value associated with the currently selected enum value.Method 5: LAVA's OpenG Get Strings from Enum.vi function with an Enum Constant, Control, or IndictatorThis method uses a VI from OpenG LabVIEW Data Library named Get Strings from Enum__ogtk.vi. Wiring an enum converted to variant, it will return all strings as well as the currently selected one. LAVA's OpenG LabVIEW Data Library is available through VI Package Manager (VIPM).
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.