LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I sort cluster names?

I made my program, and the cluster names are in such an order that the cleanup makes a "wire hairball".

 

Capture.PNG

 

I would very much like to "clean up" and be able to re-order the names without touching them.  I know that the more times that I touch them AFTER my code is running, the more likely I am to break something that I already made work, and then have to fix it.  It is much more cost effective for my company to not have to pay me to make then fix my mistakes, especially if I can keep from making them in the first place.

 

Is there a cleanup that applies to "un-bundle by name"?

0 Kudos
Message 1 of 5
(2,935 Views)

No, but what you can do is create ANOTHER unbundle by name with the names in the order you want them to be in, then connect a wire going from the correct wire to that one.  Of course this creates a broken wire, but you just delete the wire going to the old one and you're fine.  Do this with all the connections.  This makes the chances of you making a mistake smaller, but not non-existent.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 5
(2,915 Views)

There are several things to think about when building and using Clusters.  First, before you use them, you can order the elements as you want.  For example, if I create and name the elements in the order "d", "c", "b", and "a", and realize I want them to read "a", "b", "c", "d", I can right-click the Cluster and choose Reorder Controls in Cluster, then choose which is first, second etc.  If the Cluster is set to Autosize vertically, the elements will move themselves around for you.  Even if they are not so set, when you open the Cluster on the Block Diagram, the order of the elements will be as you've set.

 

But what if you want to unbundle B before A?  Before you wire it, right-click and choose the element you want first, second, etc.  (You can even choose B, B, B, but that is silly).

 

But once everything get wired, it becomes harder (as you are discovering).  If just one unbundled element is out of order (say the indicators are stacked in the order B, C, D, A and you've unbundled A, B, C, D), you can right-click the unbundle element you want to remove (here A), choose "Remove Element", go where you want to add it (if it's on the end, simply drag down, giving you another D, and change it to A) or click where you want it and choose Add Element.  Don't worry, we've all had to do this (though with practice and experience, you'll do it less often ...).

 

Bob Schor

Message 3 of 5
(2,899 Views)

@Bob_Schor wrote:

There are several things to think about when building and using Clusters.  First, before you use them, you can order the elements as you want.  For example, if I create and name the elements in the order "d", "c", "b", and "a", and realize I want them to read "a", "b", "c", "d", I can right-click the Cluster and choose Reorder Controls in Cluster, then choose which is first, second etc.  If the Cluster is set to Autosize vertically, the elements will move themselves around for you.  Even if they are not so set, when you open the Cluster on the Block Diagram, the order of the elements will be as you've set.

 

But what if you want to unbundle B before A?  Before you wire it, right-click and choose the element you want first, second, etc.  (You can even choose B, B, B, but that is silly).

 

But once everything get wired, it becomes harder (as you are discovering).  If just one unbundled element is out of order (say the indicators are stacked in the order B, C, D, A and you've unbundled A, B, C, D), you can right-click the unbundle element you want to remove (here A), choose "Remove Element", go where you want to add it (if it's on the end, simply drag down, giving you another D, and change it to A) or click where you want it and choose Add Element.  Don't worry, we've all had to do this (though with practice and experience, you'll do it less often ...).

 

Bob Schor


Myself, I get mixed up when I do it that way.  But it's a perfectly sound solution for someone who isn't as scatterbrained as I am.  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(2,888 Views)

I haven't tried this, but it looks like it should work - http://forums.ni.com/t5/LabVIEW/Rearrange-bundle-unbundle-node/td-p/3327125


___________________
Try to take over the world!
Message 5 of 5
(2,833 Views)