LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change propertyof array in subvi

Hello,
i know how to change a property of an OK-button.
Now i have an array of OK-buttons. How can i change a property of one of the buttons in the array?
See the attached VIs. In the top-vi i have two arrays. The "main-array" is the array where the properties have to cange. the disable list is the array where i select which indices to disable. Now the subvi gets a reference of the main-array.
The propblem is how to get from this array-reference a reference to only one button in the array.
Has someone a tipp for me?
Thx for your help
0 Kudos
Message 1 of 4
(2,625 Views)
Hello NewOne,

You can't set the properties of one element in an array, If you want something like that you need a cluster with several buttons!

In general an array is not a good UI element.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 4
(2,619 Views)
Thanks for your tip with the cluster. It works now like i want.
The only problem is that it is very slow. I attached a working program
You see 4 arrays at the top and 4 clusters  at the bottom. When running the prgramm an cklicking any points at the top and then pressing "Execute" the same points are disabled at the bottom part.
But if i click all points of an array at the top (128 points) and execute it then its very slow because all properties have to change in the lower cluster.
Is there a faster way to do this than my way?


0 Kudos
Message 3 of 4
(2,604 Views)
Hi NewOne,

could you add the .ctl files also...
If  I look at your code I would change the matrixtoindex.vi to output two arrays, one with the elements to disable and one with the elements to enable, this will process each control one time (or better let the output array put the 'enabled' state out for each of the controls (thus 0 or 2 in your case) and make the matrix to index.vi reentrant in that case the processing will go faster.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 4
(2,594 Views)