From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AllObjects[] from cluster doesn't match cluster ordering?

Solved!
Go to solution

I have a cluster of String controls for which I am trying to retrieve the labels for each of the individual strings.  My goal, as part of a larger project, is to pass differently labeled strings but same cluster size into this subVI and then write the string labels & text to a file.  However, the indexes of the references in the AllObjects[] property doesn't match up with the ordering I gave the cluster objects....why?  If not from the ordering of the cluster objects, how is the AllObjects[] order being determined?

 

Is there maybe some property I'm overlooking that can match the elements of allObjects back to their index within the cluster?

 

Or any other suggestion to obtain the labels of controls within the cluster while maintaining the same ordering as the cluster?

Download All
0 Kudos
Message 1 of 3
(2,116 Views)
Solution
Accepted by topic author mikep815

You need to use the Controls[] property of the Cluster class to get the controls in their cluster order. I'm not sure what order the AllObjs[] property returns...maybe the order in which they were initially dropped? The reason there are two properties is because AllObjs[] would also include any decorations inside the cluster.

Message 2 of 3
(2,109 Views)

Yes Darren, AllObjs[] lists in Z order


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(2,104 Views)