To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to retrieve the data type of all front panel objects through the use of VI Server, Property Nodes & Scripting Property Nodes.
Description
LabVIEW has no direct way for determining the data types of the objects on the Front Panel, this example scans through the Front Panel Objects and returns their datatype to an output array. The output array is ordered based on the control index of the Front Panel Object.
It does this by analyzing the general class name for the object, and then determining whether further evaluation is required. For e.g. an object with the class name of Boolean could be put straight into the array; However an object with the class name of Array would require further investigation to determine the representation of the elements in the array.
For determining the exact type of numeric/refnum/cluster etc., a variety of Scripting property nodes, standard property nodes and lookup tables are used where required.
While most data types are relatively straight forward to determine through this method of searching for representations or checking lookup tables, it is worth noting that clusters require a recursive method due to the ability to place clusters within clusters.
All of the code is documented; However if anything is unclear (or errors are spotted), feel free to comment and I'll be happy to discuss it further.
Requirements
Steps to Implement or Execute Code
Additional Information or References
**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.
This says it is for front panel "objects" but it is really for front panel "controls" (and indicators).
Decorations, comments and other non-control front panel objects are ignored.
Good point - updating now
Hi,
I can't open this .zip with LABView 2012. Could you release a new version ?
Thanks
Vincent