LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Quick Drop Align Objects Quicker

So I find my self aligning objects a lot.  I love the quick drop tool for aligning front panel objects to the terminal pane.  I also like aligning objects on the front panel and block diagram as done in this quick drop tool.  But what I don't like is the number of key presses I need to remember to align objects using it.

 

Lets say I'm on the block diagram, and I have a few constants selected.  I want to align them to the right, and vertically compress them to save space.  Using QuickDrop and the linked tool I need to do the following:

 

CTRL + Space

CTRL + Shift + A

Click on align right

Click on vertical compress

 

Without quick drop I need 4 steps as well

 

Click on Align Objects

Click Right Align

Click on Distribute Objects

Click on Vertical Compress

 

The quick drop tool does have other shortcut commands but there are still too many steps.

 

So I have modified the QuickDrop tool in LabVIEW 2011 to have aligning and distributing with as few key presses as I can.  With my modifications to align objects to the right and vertically compress you perform the following steps

 

CTRL + Space

Shift + (hold f)

 

When your hands are on the home keys the letter f is on the right so this is why I picked it.  I thought about moving to the ASDW location and maybe I'll change my mind but for now the keys are SDFE S = Left, D = Bottom, F = Right, E = Top.  Holding the Shift key will vertically or horizontally compress too.

 

So what's the catch?  Well you see to make this work it needs to modify a VI that is an integral part of quick drop, and NI would probably rather you didn't mess with it.  If you don't mind fooling around with NI files you may try this, but please don't contact NI if you broke something.  Just backup your files, then restore them later when you are done experimenting.

 

Go to your <LabVIEW 2011>\resource\dialog\QuickDrop folder

Make a copy of the "QuickDrop Launch Window.vi" and rename the copy to "QuickDrop Launch Window - Original.vi"

Unzip the attached zip into your <LabVIEW 2011>\resource\dialog\QuickDrop folder overwriting the one file we just backed up.

 

Now when you call quick drop, and hold S, D, F, or W it will align the selected objects in that direction.  And again adding the shift will compress them too.

 

To go back to the normal configuration delete the "QuickDrop Launch Window.vi" and rename the original back to "QuickDrop Launch Window.vi".

 

This is only recommended for LabVIEW 2011, but I tested it on 2012 and 2013 and it works too.  But doing this will replace the 2012 or 2013 versions with the 2011 version and that could cause other issues I haven't found yet.

Message 1 of 10
(4,477 Views)

@Hooovahh wrote:

[...]

 

Lets say I'm on the block diagram, and I have a few constants selected.  I want to align them to the right, and vertically compress them to save space.  Using QuickDrop and the linked tool I need to do the following:

 

CTRL + Space

CTRL + Shift + A

Click on align right

Click on vertical compress

 

[...]


 

CTRL + Space

TRL + Shift + A

Click on align right

Click on vertical compress

type r

 

The page for the plugin says type "l" to align left, and that does work, but typing "a" works to align left as well.  I use that 'cuz it's closer to my left hand.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 10
(4,433 Views)

Yes I'm glad it can be reduced to 3 steps but I still somehow screw it up and have to retry a few times.  This means taking more time then it would if I would just click the buttons manually.  The fewer steps to remember (and mess up) the better in my mind.

 

To be honest I'd rather not need to involve QuickDrop at all.  Being able to press CTRL + Right Arrow which be nice.  This would be possible if NI would allow user menu items to have shorcuts defined for them.  I know this shortcut would mean taking my hand off of the mouse but I still think I would prefer this method.

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-Keyboard-Shortcuts-for-User-Items-in-Tools-Menu/...

 

 

0 Kudos
Message 3 of 10
(4,422 Views)

I totally agree something like "ctrl shift + up / down / left / right" would make things much faster

0 Kudos
Message 4 of 10
(4,240 Views)

Just a friendly suggestion: You can avoid a few keystrokes with some built in decision making for block diagrams. I know milage will vary here.

 

If I'm in the block diagram and I have a bunch of controls selected, I always want to align right. Same goes for

BD- Indicators- Left

BD- VI's- Left/Right or Top/Bottom depends on what format they are currently closest to. If they are horizontal-ish, align top. If they are vertical-ish, align left. (code speak: if delta X > delta Y then align top, if delta X < delta Y then align left)

 

Compression: You may not be able to settle on an automated standard, so I imagine it works as-is.

 

(*sigh* my love of UIs is going to push me into quick drop scripting isn't it?)

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 5 of 10
(4,216 Views)

@JW-JnJ wrote:

 

*sigh* my love of UIs is going to push me into quick drop scripting isn't it?


Your love of LabVIEW should push you into QD scripting Smiley Wink

 

But seriously some of my favorite code is advanced scripting and XNode development.  QD is just a way of making that code more easily accessible.

0 Kudos
Message 6 of 10
(4,205 Views)

A little quicker, but TOTALLY outside what people are use to so probably not in the end. Honestly I did this as a "Hmm, I wonder if I can" and "I bet that would be fun".

 

(First time with quick drops and scripting, so I'm probably missing a few nuances)

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 7 of 10
(4,163 Views)

Did you read my first post?  I linked to this QD that I think does the same as what your does.

 

https://decibel.ni.com/content/docs/DOC-14469

 

What I'd prefer is QD not be the catch all for invoking shortcuts, and we should have a way to do a CTRL+(something) to perform an align.  My first post was an attempt to make align quicker with QD because I couldn't think of any other native way to make it faster, but that had too many limitations.

0 Kudos
Message 8 of 10
(4,145 Views)

@Hooovahh wrote:

Did you read my first post?  I linked to this QD that I think does the same as what your does.

 

https://decibel.ni.com/content/docs/DOC-14469

 

What I'd prefer is QD not be the catch all for invoking shortcuts, and we should have a way to do a CTRL+(something) to perform an align.  My first post was an attempt to make align quicker with QD because I couldn't think of any other native way to make it faster, but that had too many limitations.


I apologize. I didn't want to give that impression that I didn't read all of the material. This was more of a tangental thought from the original concept. The original idea was to reduce keystrokes and I took a hack at it by allowing simulataneous actions (mouse/keyboard combo) and making the distribution optional. I didn't want to delve into modifying the quick-drop on my first quick-drop venture, so just imagine them in conjunction.

 

Not to let my wacky experiment detract from the original idea, I really like the idea of modifying quick-drop behavior. Done right, it would reduce my discomfort with quick-drop shortcuts. Ctrl-space then ctrl-something always felt odd to my hands. It might be why I don't use them nearly as much as I should.

 

Edit: What would you think to slightly modifying the concept and using a slightly long key-press on the first  letter instead of shift? It would allow further keys to be used easier (I'm looking at you Ctrl+I). I'm saying this without ever looking at the code (can't) or tried interrupting keyboard strokes.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 9 of 10
(4,134 Views)

@JW-JnJ wrote:
I apologize. I didn't want to give that impression that I didn't read all of the material. This was more of a tangental thought from the original concept. The original idea was to reduce keystrokes and I took a hack at it by allowing simulataneous actions (mouse/keyboard combo) and making the distribution optional. I didn't want to delve into modifying the quick-drop on my first quick-drop venture, so just imagine them in conjunction.

Oh in that case I like your version.  The mouse enter does make it quicker to use if I have my hand on the mouse.

0 Kudos
Message 10 of 10
(4,106 Views)