LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically create an Enum from an array of strings?

Solved!
Go to solution

How do I programmatically create an Enum from an array of strings? I'm trying to programmatically build an Enum containing a list of tests to execute, based on the user's product selection.

 

0 Kudos
Message 1 of 3
(8,505 Views)

It is not possible to define the values of an enum at run time.

 

It is possible to define the strings associated with a ring.

 

If this is a one time event that needs to happen at development time then push your strings into a ring control then right-click and doa replace then navigate to an enum.

 

Just trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 3
(8,503 Views)
Solution
Accepted by topic author Rchrd

My Variant To Control code on LAVA has a demo VI to convert an array of strings to an enum.

HelpInfo.PNG

 

 

Ton

Message Edited by TCPlomp on 21-09-2009 10:54 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 3
(8,483 Views)