LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Easy way to work with array of control references?

You might be able to "tag" a control and find it by that.

 

First run:

Example_VI.png

 

Change names and order of controls in cluster (and disable the tag-setting loop):

Example_VI.png

 

I still got the same tag values for the controls with the original tag names.  Name and order don't matter any more.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 11 of 13
(562 Views)

It sounds like you both understand my point and don't understand my point. On the idea exchange one of the suggested workarounds was getting a ref to the control you want to modify inside the cluster. That is, if you want to modify the boolean in slot 2 you get a reference to it. Yes, managing 20 of these individual references when LabVIEW has the info you need to make it easier on you is annoying, but you said safety was your priority. This seems like the way to do it.

0 Kudos
Message 12 of 13
(551 Views)

@1984 wrote:

[...]

If I change the order of the elements in the cluster then the order in the controls[] array will change as well and that can remain completly hidden. So referring to the controls by their index in the controls[] array is not optimal. Also referring the control by their name isnt optimal as you may change the name of the items after a while.

[...]


 

I've seen  instances where changing names/order in clusters isn't handled well by the editor and the unbundle nodes end up broken (or worse, if the same type is unbundled and nothing breaks except functionality).  I expect the same would/could happen if we could unbundle references the way I think you want.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 13 of 13
(532 Views)