Example Code

Retrieve Array Element Types in a Cluster By Reference

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 Overview
This example VI demonstrates how (by cluster reference) to determine the element type of an array within our cluster.

 
Description
In working with clusters by reference, some information of the objects within clusters is unavailable.  One such example is the array element type.  It is important to understand the the properties and methods a cluster has must be available and shared among ALL objects within. 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run the VI.
  2. Check the class property in the middle pane and the data type in the third pane.

 

Additional Information or References
VI Block Diagram
5-77.png

 

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

Cole R.
National Instruments
Software Engineer

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

Comments
Olivier_L
Active Participant
Active Participant
on

What about defining the Array element types if the type is a cluster?

How to get a reference of the array elements to get the inside cluster architecture?

Olivier L. | Certified LabVIEW Developer


Cole_R
Member
Member
on

Hi Olivier_L,

From the array reference, you should be able to use the property node to get the ArrElem reference.  From there, you can move to the more specific cluster class and get the objects within the cluster.

ClusterElementsinArray.JPG

Something like this should work for you.  Hope this helps!

Cole R.
National Instruments
Software Engineer