LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert the item name of an enum constant to text?

Solved!
Go to solution

For an enum control or indicator I can use the "String[]" property together with Index Array to get the item text.

But for an enum constant, I don't know how to do it, however I have seen a solution some years ago, but I can't remember it.

 

Hoping that there is a skilled developer out there who is kind enough to help me.

0 Kudos
Message 1 of 5
(3,218 Views)

Hi Lefi

 

Haven't had time to really look at it, but there's always a way round things if you can't find an elegant solution.

enum string.png

 

Jevon

0 Kudos
Message 2 of 5
(3,213 Views)
Solution
Accepted by topic author Lefi

Format Into String is your friend. You even don't need to set its format string input in this case.

 

Enum.jpg

 

Message 3 of 5
(3,209 Views)
The OpenG Get Strings from Enum.vi can help, too.

 EnumStrings.png
Message Edited by jcarmody on 03-19-2010 06:42 AM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 4 of 5
(3,185 Views)

Thank you JB for your compact solution. This is probably what I saw some years ago.

And thanks to jcarmody for the tip on snippets. I'll definetly try that.

0 Kudos
Message 5 of 5
(3,150 Views)