Example Code

How to pull out the Type of an Enum in LabVIEW

Code and Documents

Attachment

Overview:

This VI exemplifies how to Typecast the VI value by choosing the associated constant.

Description:

This VI uses the Type Cast Function to convert a numeric input into its representation in a type definition enum.

Requirements:
LabVIEW Base Development System.

Steps to Implement or Execute Code:
1. Load the attached VI named "Enum Pull Out Type LV 2012 - NI Verified.vi" with a valid input path" as a subVI.
2. Use a valid numeric value in the "Enum Item Number" control.

Note: In case the enum type definition is change, remember to change the limits of the "Enum Item Number" control to match
the number of items in the new enum.


Additional Information or References:
Snippet 9848.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

National Instruments
Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.