LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
Top Kudoed Authors
Showing results for 
Search instead for 
Did you mean: 

Create Constant - Label causes resize of structure when plenty of whitespace is available

When you create a constant on the diagram from an object with a name, often the new constant's label runs into the enveloping structure's border, causing the structure to resize.  This process is quite dumb, as even if there is lots of room around the constant, LabVIEW insists on forcing a resize due to the collision.  Since the space is there, surely the routine could recognize that and only force a resize if there is not enough space.

in the example, the control was against the LHS of the loop; after creating the constant, I moved it down for vertical clearance, then made the label visible.  The label forced the loop resize to the left, ignoring the space to the right.


structure resize image.png

Trusted Enthusiast
Trusted Enthusiast

This happens because you have "Place structures with Auto Grow enabled" in your options. Turn this off and that won't happen anymore:





You can also disable this for each structure individually, if you want a less drastic option.


I know why it happens.  However, you don't really need to cut off your left leg to fix that torn toenail.  The auto grow feature is just fine, but some smarts are needed.


Knight of NI

Turning off Auto Grow would be very annoying and is not a solution.  I realize there are a handful of people who dislike Autogrow and you must be one of them.  Having Auto Grow turned off is risky as you may do something that should grow the structure, but instead it starts hiding code beyond the boundaries.


The problem here is caused by the default alignment of labels on constants, indicators, and controls.  Controls are left aligned with the terminal.  Constants and indicators are right aligned with the terminal or constant.  At least with my mini-experiment.


The real solution here is when you show the label for the constant and realize it grew your structure in a way you did not want, undo it.  Right click on the constant, properties, then edit the label and make it visible that way.



Active Participant

See this relatively recent post which is related

Tim Elsey
LabVIEW 2010, 2012
Certified LabVIEW Architect
Trusted Enthusiast
Trusted Enthusiast

Ravens Fan, actually, check this recent post about constant label location. There appears to be a bug...

As far as autogrow is concerned, I'll return your answer: if you realize you need autogrow for a structure, you can just undo you insertion, turn it on and then put your stuff in it again...


Sure, if you don't mind doing things that the software can do.  This forum is for ideas for improvements.  I think LabVIEW would be just a teensy bit better if, when it creates something, it identifies available space before blindly creating a new hole.  Yes, I can manually rejustify the label, but the damage is done, so then I have to undo it, fix it, and then redisplay it.  All because when I make it visible, there is no smarts about where it is placed.  THere are other similar gotchas.

When I show a large cluster as an icon, move it to the edge of a structure, then re-show the content, the item is resized in place, overlapping other things.  What if it had the smarts to place itself in whitespace, but remember where the icon was centered last?  THen when I reselect show as icon, everything is restored?  Other posters have suggested an edit window, but that's messy because it can't remain visible unless it becomes a subvi, which is another way of burying clusters.



Knight of NI

By default, created constant don't show their label! You must have this option specifically enabled to show them (Environment:show created constant labels).


Long ago, I once thought this is a good idea, but I have since abandoned it. It gets too annoying in a majority if cases. Smiley Wink



yep.  two comments - style difference - I like to know what those buried constants are for; keeps me honest.  Having several constants on the diagram for the same purpose becomes easy to spot.


legacy code reconstitution - let's see, what is that constant for<desperate hope kicks in> maybe that so-and-so labelled the constant, or created a constant to replace a control/indicator, which would mean it might just have a meaningful (or misleading, I know) label.


Anyway, it's not worth the bandwidth.  I just have a hate on for doing cosmetic rubbish that I feel could be handled better automatically.


Active Participant

I wonder whether a solution to this problem (and this one) would be to separate the action (creating a constant) and the resizing in the Undo queue?  So one Ctrl-Z would un-resize, and the second would remove the constant? Although it may work better if there was some sort of Undo history.

Active Participant

I always disable autogrow as one of the first things. It always messes up my code, and I have no problem resizing code manually.




CLA, CTA, CLED & LabVIEW Champion