Search code examples
labview

How to reorder controls in cluster without breaking existing references?


I would like to reorder controls in a cluster (typedef) to set a tab order that makes sense. When I do it as instructed, the already existing references to controls within the cluster get mixed up.

Here is a screenshot of the control typedef and the block diagram before and after reordering the controls: enter image description here

... after saving the changes in the control, LabVIEW automatically changed the references, probably in an attempt to maintain the same order (and not the same label).

Is there a way to maintain the integrity of my references (I have a lot) after changing the tab order?


Solution

  • You've definitely found some non user-friendly behavior here. But I would also argue your sample code here defeats the purpose of a cluster by referencing each element individually within the cluster.

    If you have a TypeDef Cluster, create a reference to the entire cluster, not the individual elements within. Then, you can use a Value Property Node on the entire cluster and unbundle the elements you want.

    If your reference breaks, save the VI and it will fix it (shouldn't break though).

    Here is my TypeDef Cluster before: enter image description here

    Then I reordered (note FP control order), but Cluster reference is not broken and unbundle function still gives correct values: enter image description here