Obtaining the String Selected from a Text Ring or Menu Ring

Updated Jan 18, 2018

Reported In

Software

  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

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.

Solution

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.

WAS THIS ARTICLE HELPFUL?

Not Helpful