String to Enum Conversion in LabVIEW

Updated Aug 30, 2023

Issue Details

I have read some data from the database and I am planning to insert one string to a LabVIEW enum control by using local variable. May I know how to convert a string value to type accepts by enum?

Solution

You can utilize Scan From String function available in LabVIEW to convert a string to enum type. Below is a simple example on how you can accomplish this.
string to enum

Additional Information

This function is case sensitive. Error 85 will happen if the string inputted is not exactly similar to any elements within the enum constant.