NI Home > Community > NI Discussion Forums

LabVIEW Idea Exchange

Showing results for 
Search instead for 
Do you mean 
Announcements
We've turned on a search before post feature in the LabVIEW Idea Exchange. This new feature will help cut down on the number of duplicate ideas in this space!

The NI Idea Exchange is a product feedback forum where NI R&D and users work together to submit ideas, collaborate on their development, and vote for the ones they like best. View all of the NI Idea Exchanges to post an idea or add your opinion on an existing one today!
GuessWho

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

Status: New
by Member GuessWho on ‎11-22-2011 01:21 PM

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

Comments
by Active Participant X. on ‎11-22-2011 01:32 PM

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

 

ScreenHunter_001.jpg

 

 

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

by Member GuessWho on ‎11-22-2011 01:41 PM

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.

 

by Knight of NI on ‎11-22-2011 01:54 PM

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.

 

 

by Active Participant elset191 on ‎11-22-2011 02:25 PM

See this relatively recent post which is related

by Active Participant X. on ‎11-22-2011 02:28 PM

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...

by Member GuessWho on ‎11-22-2011 02:28 PM

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.

 

YMMV.

by Knight of NI on ‎11-22-2011 02:35 PM

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. :smileywink:

by Member GuessWho on ‎11-22-2011 02:53 PM

altenbach

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.

Thanks

by Active Participant GregS on ‎11-23-2011 02:31 PM

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.

by Active Participant SteenSchmidt on ‎11-25-2011 12:41 PM

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

 

Cheers,

Steen

Latest LabVIEW Idea Exchange Blog Posts
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!
Idea Statuses
Top Kudoed Authors
User Kudos Count
79
77
36
32
32