LabVIEW Idea Exchange

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

Anchor point for new control/indicator placement on block diagram

Hello,

 

Did a brief search to see if anyone has mentioned this, haven't seen it.

 

I've always been a little perplexed at where LV decides to place new terminals on the block diagram, which were created from the front panel.  It's almost like a randomizing algorithm was written to make sure that they are placed completely randomly, even to the point that they will show up in various random cases of a case structure.

 

A very simple solution to this would be to allow the programmer to place an anchor on the block diagram, and all new control and indicator terminals successively are placed down or right of the anchor point as more are added.  

 

Apologies if this has already been posted.

 

-Ben

13 Comments
AristosQueue (NI)
NI Employee (retired)

The existing algorithm isn't random -- it tries to put the FPTerm in the same relative position on the diagram as the control is on the panel. So if you drop the control in the lower right of the panel, the terminal appears in the lower right of the diagram (as it is scrolled currently). It moves a bit to find a block of empty space large enough for the terminal.

 

Having said that, yes, there must be a better mechanism. You're not the first to suggest that, merely the first to suggest it on the Idea Exchange. And so... kudos from me.

Ben_Phillips
Member

Wow, I can't believe I never made that connection, thanks for explaining.  I guess 30k iterations wasn't enough for me to notice the pattern.

dthor
Active Participant

The option to have this "anchor point" should also apply to the front panel and copied code.

Ben_Phillips
Member

Not sure if I understand what you mean, dthor.  I would imagine copied code would iterate new terminals to the right or down.

 

Maybe we're on the same page already.

JackDunaway
Trusted Enthusiast

>> You're not the first to suggest that, merely the first to suggest it on the Idea Exchange.

 

There was a similar discussion on the IdEx that involves a Floating Window to temporarily house new terminals. Anyone voting for this Idea, check out the Web UI Builder, which implements this concept. I like the implementation, and it would work well with "classic LabVIEW". +1 for both Ideas to bring visibility to the Web UI implementation.

elset191
Active Participant

 


@Aristos wrote:
You're not the first to suggest that, merely the first to suggest it on the Idea Exchange.

Not quite.

 

Edit:  D'oh.  Didn't catch that Jack's new IdEx lingo meant idea exchange.

--
Tim Elsey
Certified LabVIEW Architect
dthor
Active Participant

Yes Ben, with your suggestion the terminals would iterate right or down. Currently they attempt to be placed in the same location as where they are being copied *from*. If a FP control is located at -300,7000 in the VI you're copying from, it will be in the middle of nowhere in the VI you're copying too. 

AristosQueue (NI)
NI Employee (retired)

> Not quite

 

I didn't consider the other idea to be a duplicate of this one. Having a user-settable anchor on diagram for where new terminals should appear isn't quite the same as having a standard off-diagram holding pen.

AristosQueue (NI)
NI Employee (retired)

> it will be in the middle of nowhere in the VI you're copying too.

 

No. It is done by *screen* coordinates. So if the control drops in the top left of the panel window, the FPTerm will drop in the top left of the diagram window, regardless of how far the panel and diagram are scrolled from their respective origins.

altenbach
Knight of NI

Ah, I did not notice this thread before. For completeness, here's a link to a related idea posted about two days later. 😉