Example Code

Search Through Nested Cluster by String

Code and Documents

Attachment

Overview

This example demonstrates how to parse through a nested cluster structure by using search strings.

 

Description

Many people know how to parse through arrays for information, but the same methods cannot be used for clusters. Because elements can be various different data types, and sizes may not be consistent, parsing through clusters is a little more challenging. Using the Data Type Parsing palette, we can convert clusters to variants and interpret them in different ways, allowing us to extract the information we need.

 

Hardware and Software Requirements

LabVIEW 2012 Base Development System or compatible

 

Steps to Implement or Execute Code

  1. Set the Array values to "Image Width Data" and "Width" respectively.
  2. Run the VI.

 

Additional Information or References

 

 

Andy F.
Applications Engineering
National Instruments

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

Contributors