LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving controls about on a VI's front panel. How do you get a reference to a 'grouped' set of controls?

Solved!
Go to solution

Basic problem (annoying, if not disasterous - but common - at least for me):

 

When you are trying to sktick two different VIs together and you copy the block diagram of one to the other, it sticks all the controls in the middle of nowhere.  THen you have to spend about 10 mins dragging the controls screen by screen from one end of the diagram to the other - sometimes over 15 screens.  Surely there has to be a better way?

** Incidentally you might think that labview would have these sort of settings in the 'properties' of the control on the right click menu - but no joy.

 

I guess the obvious thing is that you can write a VI which will get a reference for a particular control and then say set it's position (x,y) to zero.  Only thing is that generally there will be a selection of controls, and often they will be organised nicely - after getting them to zero you don't want to have to reorganise them again.  I tried grouping the controls, but then the problem is - how do you get a reference to a group of controls.  If you move one of them it doesn't keep the spatial arrangement.  At this point i have got lost - and easily spent more time than it is worth fixing this problem.

 

Any thoughts?

 

 

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

would you please add some graphic\pictures for what u r asking for, i dont really get what u r looking for.

0 Kudos
Message 2 of 5
(2,828 Views)
Solution
Accepted by topic author wideofthemark

If I understand you correctly, when you copy the block diagram from the second VI to the first, the controls of the second VI end up in far left field on the front panel of the first, correct?  I think these added controls will maintain their relative locations among themselves so you should be able to find them all as a group out in left field. Then it's simply a matter of how to get them to enmasse join the rest of the controls on the front panel. There are a couple of easy ways to do this. There is a button on the toolbar at the top of the front panel window that allows you to reorder/group/ungroup front panel objects. You can select all controls/indicators out in left field and "group" them together. (As an alternative, you can also drop them all onto a tab control which will act as container for them). Then you select this group and with it selected scroll back over to the existing front panel and find and ALSO select (hold down shift key) a control/indicator from the existing group too. Then with BOTH the existing control selected and the new group (or tab control with the new group) selected you use the ALIGN buttons to quickly bring a corner of the new group into alignment with the old control. At that point you can ungroup the new stuff and move it where it needs to be. 

Message 3 of 5
(2,810 Views)

Hi,

 

Thanks for the help.  Feel rather stupid not having found this before.  I was thinking that there had to be a better way to do it - and writing a vi to manipulate things is definately re-inventing the wheel.

 

Thanks a lot.

 

JP

0 Kudos
Message 4 of 5
(2,799 Views)

I understand completely.

I think this button existed for several years in LabVIEW before I ever got around to looking to see what it did.

Clipboard01.jpg

0 Kudos
Message 5 of 5
(2,786 Views)