Quick Drop Enthusiasts

Quick Drop Keyboard Shortcut – Arrange VI Window

The Arrange VI Window plugin arranges front panel controls based on the connector pane. It also resizes and repositions both front panels and block diagrams to minimize white space and position windows near the upper left corner of the screen. Windows are sized and positioned based on the size of the monitor. If there are too many items, only a portion of the content is shown.

 

To install this shortcut, unzip the attachment in one of the following locations (no LabVIEW restart required):

<LabVIEW 20xx>\resource\dialog\QuickDrop\plugins

<LabVIEW Data>\Quick Drop Plugins

 

This shortcut is intended for use with LabVIEW 2014 through 2018.

 

This shortcut was inspired by the following: https://forums.ni.com/t5/LabVIEW-APIs-Documents/Quick-Drop-Align-front-panel-controls-to-connector-p...

 

The following is an example with front panel controls and indicators laid out inconsistenly with the connector pane, and with a lot of unused space on the sides.

FP Example Before.png 

With this plug-in installed and the default shortcut assignment, pressing Ctrl-Space, Ctrl-F results in the following:

FP Example After.png 

Note that the positions of the controls and indicators on the front panel are now consistent with the positions on the connector pane. The height and the width of the front panel window are sufficient to accommodate controls and indicators with reasonable vertical spacing and margins. In addition, the width accommodates all toolbar items.

 

Any items on the front panel that are not on the connector pane such as additional indicators and decorations get shifted together and placed below the lowest controls and indicators associated with the connector pane.

 

You can use this plug-in with front panels of globals and controls in which case the plug-in only resizes and repositions the window.

 

To continue the example, assume that the starting point was the following block diagram.

BD Example Before.png 

Pressing Ctrl-Space, Ctrl-F results in the following:

BD Example After.png 

 

Note that all items are moved together toward the upper left corner of the window and the height and the width of the block diagram window are sufficient to accommodate all the items with reasonable margins. In addition, the width accommodates all toolbar items.

 

You can control certain aspects of operation of this plugin by setting the following LabVIEW.ini tokens:

Token

Default Behavior or Value

Description

VIWin.DisplayWorkspaceRight

Depends on the computer – refer to the Description

Intended for team development. Specifies the minimum monitor width between the team members so that the shown portion of VI windows fits even on smallest monitors. If the INI token is not present the value obtained from the Right component of the Display: Primary Workspace property of the Application class is used.

VIWin.DisplayWorkspaceBottom

Depends on the computer – refer to the Description

Intended for team development. Specifies the minimum monitor height between the team members so that the shown portion of VI windows fits even on smallest monitors. If the INI token is not present the value obtained from the Bottom component of the Display: Primary Workspace property of the Application class is used.

ArrangeVIWin.BD.MinWindowWidth

780

Specifies the minimum block diagram widow width. Expressed in pixels.

ArrangeVIWin.BD.MinWindowHeight

200

Specifies the minimum block diagram widow height. Expressed in pixels.

ArrangeVIWin.FP.MinWindowWidth

715

Specifies the minimum front panel widow width. Expressed in pixels.

ArrangeVIWin.FP.MinWindowHeight

200

Specifies the minimum front panel widow height. Expressed in pixels.

ArrangeVIWin.BD.LeftGap

45

Specifies the gap between the left edge of the monitor and the left edge of the window. Expressed in pixels.

ArrangeVIWin.BD.TopGap

45

Specifies the gap between the top edge of the monitor and the top edge of the window. Expressed in pixels.

ArrangeVIWin.BD.MinRightGap

15

Specifies the minimum gap between the right edge of the monitor and the right edge of the window. The gap may be larger than this value depending if a relatively narrow window accommodates all relevant contents. Expressed in pixels.

ArrangeVIWin.BD.MinBottomGap

15

Specifies the gap between the top edge of the monitor and the top edge of the window. The gap may be larger than this value depending if a relatively short window accommodates all relevant contents. Expressed in pixels.

ArrangeVIWin.FP.LeftGap

15

Specifies the gap between the left edge of the monitor and the left edge of the window. Expressed in pixels.

ArrangeVIWin.FP.TopGap

15

Specifies the gap between the top edge of the monitor and the top edge of the window. Expressed in pixels.

ArrangeVIWin.FP.MinRightGap

45

Specifies the minimum gap between the right edge of the monitor and the right edge of the window. The gap may be larger than this value depending if a relatively narrow window accommodates all relevant contents. Expressed in pixels.

ArrangeVIWin.FP.MinBottomGap

45

Specifies the gap between the top edge of the monitor and the top edge of the window. The gap may be larger than this value depending if a relatively short window accommodates all relevant contents. Expressed in pixels.

SnapGridFrontPanelSize

12

This INI token is not specific to the tool. It reflects front panel grid size specified through Tools>Options>Front Panel. Note that front panel grid size is not available on a per-VI basis through VI Server/scripting. Expressed in pixels.

ArrangeVIW.FPObj.HorizontalMarginFactor

2

Specifies the minimum margin between vertical edges of the window and the closest vertical edges of controls/indicators. Expressed in grid size units. For example, if grid size is 12 and this factor is 2, the minimum margin is 24 pixels.

ArrangeVIW.FPObj.VerticalMarginFactor

2

Specifies the minimum margin between horizontal edges of the window and the closest horizontal edges of controls/indicators. Expressed in grid size units. For example, if grid size is 12 and this factor is 2, the minimum margin is 24 pixels.

ArrangeVIW.FPObj.HorizontalSpacingFactor

3

Specifies the minimum horizontal space between adjacent columns of controls/indicators. Expressed in grid size units. For example, if grid size is 12 and this factor is 3, the minimum space is 36 pixels.

ArrangeVIW.FPObj.VerticalSpacingFactor

3

Specifies the minimum vertical space between adjacent rows of controls/indicators. Expressed in grid size units. For example, if grid size is 12 and this factor is 3, the minimum space is 36 pixels.

ArrangeVIWin.BDCanvasMargin

10

Specifies the margin between the edges of the window and the contents. Left margin is always honored. Top margin is honored as long as both leftmost and topmost items can be made visible at the same time. Right and bottom margins are honored if possible, based on other constraints. Expressed in pixels.

  

Kosta

 

Kosta
Message 1 of 8
(1,848 Views)
7 REPLIES 7
Highlighted

Re: Quick Drop Keyboard Shortcut – Arrange VI Window

To install this shortcut, unzip the attachment in one of the following locations (no LabVIEW restart required):

<LabVIEW 20xx>\resource\dialog\QuickDrop\plugins

<LabVIEW Data>\Quick Drop Plugins

 

Are there advantages/disadvantages to installing in either of the suggested locations?

0 Kudos
Message 2 of 8
(1,545 Views)
Highlighted

Re: Quick Drop Keyboard Shortcut – Arrange VI Window


@TeraTech wrote:
To install this shortcut, unzip the attachment in one of the following locations (no LabVIEW restart required):

<LabVIEW 20xx>\resource\dialog\QuickDrop\plugins

<LabVIEW Data>\Quick Drop Plugins

 

Are there advantages/disadvantages to installing in either of the suggested locations?


Do you want these plugins to be available for all users or just the current user?  Also some users won't have write permissions to places under Program Files and may only be able to install them under the location for just their user account.

0 Kudos
Message 3 of 8
(1,539 Views)
Highlighted

Re: Quick Drop Keyboard Shortcut – Arrange VI Window

If you install the plugin in the LabVIEW folder, you can only use it in that LabVIEW version. If you install it in the LabVIEW Data folder, you can use it in any version of LabVIEW (2014 or later) installed on your computer.

DNatt, LV R&D
Message 4 of 8
(1,526 Views)
Highlighted

Re: Quick Drop Keyboard Shortcut – Arrange VI Window

Hooovahh and Darren, Thank you for answering TeraTech's question.

Kosta
0 Kudos
Message 5 of 8
(1,507 Views)
Highlighted

Re: Quick Drop Keyboard Shortcut – Arrange VI Window

Does the plugin align controls/indicators in a way which satisfies "VI Analyzer"?

 

I can't find anything that explains what "VI Analyzer" is looking for in terms of control/indicator alignment to the control-grid. Its just never happy!

 

 

0 Kudos
Message 6 of 8
(799 Views)
Highlighted

Re: Quick Drop Keyboard Shortcut – Arrange VI Window

There are several tests that ship with the VI Analyzer Toolkit that relate to front panel control position. I assume you're referring to the 'Control Alignment' test, and yes, this plugin will arrange your panel in such a way that the Control Alignment test is satisfied.

 

See here for a list of all VI Analyzer Toolkit tests.

DNatt, LV R&D
0 Kudos
Message 7 of 8
(789 Views)
Highlighted

Re: Quick Drop Keyboard Shortcut – Arrange VI Window

A checkbox was added to the Control Alignment VI Analyzer test for LabVIEW 2019 to make the test work better with Arrange VI Window Quick Drop. I use that test configured as shown below:

 

Control Aligment Configuration.png

 

You may get a false positive if you check both the "master rectangle" and the "top/bottom" boxes when one or more controls are type defs. NI VI Analyzer R&D team is aware of this.

 

Kosta
0 Kudos
Message 8 of 8
(777 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.