ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify multiple Menu rings in a loop?

 

I would like to modify the Strings of 15 Menu Rings in a loop as follows:

 

Calculate new values

 

Start For Loop

 

Write new values to property node Menu ring(N) / Strings[]

 

End loop

 

I want to have one poperty node in the loop, whos' reference (or link) gets modified, to point to a different Menu Ring for each iteration of the loop. In other words, without having 15 different property nodes.

 

Is it possible?  

 

Thanks.

0 Kudos
Message 1 of 3
(2,736 Views)

You can create a reference for each control (right click->create...), then build these references into an array using build array, then iterate over the array in a for loop using auto-indexing.

 

You can do the same for the arrays of strings, but because the arrays can probably have different lengths, you should put each 1D array into a cluster and build a 1D array of the clusters. This is because a 2D array can not have a different number of elements in each row.

 

If you do this kind of thing often, you can save time on creating the reference by using this.

 


___________________
Try to take over the world!
Message 2 of 3
(2,729 Views)

Thanks, 

 

That is going to work. 

I had tried creating references, and then dropping them into an Array Constant which didn't work.

But using your method of "build array" works great, thanks.

0 Kudos
Message 3 of 3
(2,724 Views)