Obtaining the String Selected from a Text Ring or Menu Ring

Updated Nov 6, 2023

Environment

Software

  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

I have a text ring or a menu ring on my front panel. These give me the number associated with the item the user selected; however, I want an easy way to find the string.

There are two methods for doing this.

Method A
A simple solution is to use a property node to retrieve the text property.
  1. Right click on your text ring or menu ring and select Create»Property Node.
  2. Locate the property node you just created on the block diagram. Right click on the property node and select Properties»Ring Text»Text.  The output of the property node is now the text selected in the ring control.
Method B
A second solution is useful when trying to limit the number of property nodes used.  A property node can retrieve the Strings[] property. Then use the index array function to find the particular string the user selected. For more information on the performance of property nodes please see the Related Links section.
  1. Right click on your text ring or menu ring and select Create»Property Node.
  2. Locate the property node you just created on the block diagram. Right click on the property node and select Properties»Strings[].
  3. Place the index array function (located on the Array palette) on your block diagram.
  4. Wire the output of the text ring or menu ring to the Index input of the index array.
  5. Wire the output of the property node to the Array input of the index array.
  6. The output of the index array is now the string the user selected in the text ring or menu ring.