LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
zenthoef

Remove Unused Elements for Bundle/Unbundle By Name

Sometimes when dealing with the Bundle/Unbundle by Name nodes, I start with more elements than I actually end up using. Then, my block diagram looks something like the following:

 

bundle by name with unused elements.png

Maybe I'm just lazy, but I really hate removing each unused item from the Bundle/Unbundle by Name node over and over. Right click on unused element, click "Remove Element", Right click on next unused element, click "Remove Element", etc... Ugh!

 

So I'm suggesting a "Remove Unused Elements" when you right click on a Bundle/Unbundle by Name nodes. With this option, right clicking on one of these nodes would look like this (emphasis added Smiley Wink 😞

 

remove unused elements.png

The result of this operation would look something like this:

 

BAM.png

Now I can spend my time coding instead of getting rid of individual elements! Smiley Happy Thoughts? 

5 Comments
RavensFan
Knight of NI

This is essentially a duplicate of Bundle Cluster: Remove Unused Inputs although that is talking more about the broken wires on a bundle while this is actual unused elements on bundle by name.

 

Remove Unused Inputs also applies.  But that didn't specifically mention Bundle by Name

X.
Trusted Enthusiast
Trusted Enthusiast

I have some doubts that the result of the operation will ever lead to nicely aligned wires and objects as shown above. Try to expand a diagram, create a VI, do anything that will result in wires being stretched apart, and NI's cleaning algorithm is going to do its things.

This is thread hijacking if there ever was one, but take a look at this sequence:

 

 

ScreenHunter_002.jpg

 

ScreenHunter_002.jpg

 

ScreenHunter_003.jpg

 

I'll let you guess where the brown wire has disappeared... 🙂

 

 

zenthoef
Active Participant

I think I'd be fine with the wires being a little messy after this operation. After all, I can just highlight that section of code and perform a selected block diagram cleanup. Smiley Happy

SnowMule
Active Participant

+1 here, though I usually shrink the (un)bundle-by-name object to the smallest and add them in choosing which elements to include as I add them.

 

Another thing, somewhat on the topic of cleaning up bundle/unbundles (same would go for the elements on the side of an event or timed structure), would be the ability to pick up and rearrange the elements inside the object rather than choosing a new element and rewiring it.

MaryH
Member