To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to populate the items in an Enum into an array of the same size
Description
This example demonstrates how to pull the Item Name from an enum and place each Item into a corresponding array.
Requirements
LabVIEW Full Development System 2012 or compatible
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Yes this works, but the Strings [] property is already an array. The For loop is not necessary in this simple case. If one wanted to modify the elements this could be done in the loop. If used, the For loop can be indexed by the array itself, although the explicit indexing by the Number of Items property may make the code easier to understand. A single property node can support multiple properties; expand it and select both the Strings [] and Number of Items properties.
That example requires enum to be a control or indicator object on the front panel. To get the same information from an enum constant use https://sourceforge.net/projects/opengtoolkit/ and Get Strings from Enum__ogtk.vi