LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LVOOP-Table as an array of classes data access

I am slowly converting my app to use OOP. Much of it will not be converted for some time so I need a way to bridge from Class data to cluster data.

 

I have a parent class that contains a  table of data that is an array of a child class. The child class control is a cluster with 21 elements/columns. To break out the data of a single row to a cluster I just index the array of classes and use unbundle to bundle for each of the 21 elements. This results in a single cluster of data that is compatible with my old code . However when I want to pass the entire array as an array of clusters I am using a for loop with the previous unbundle to bundle to get the array of clusters. This means that anytime I want to extract data from the entire table on the class array wire I must use a for loop.

 FPI Data Extraction.png

Is there a better way to do this?

 

TIA,

 

Norm

0 Kudos
Message 1 of 2
(2,021 Views)

Not Easily, 

 

I think you could be doing something like this:

to 1d vars.png

 

EDIT putting an array of your cluster where I have my Array of Variants might result in a clean conversion, but I'm not sure

 

Then, you should be able to select your desired row/column of data from the created array.

0 Kudos
Message 2 of 2
(1,978 Views)