It has come to my attention in recent weeks that a shocking number of LabVIEW programmers aren’t taking full advantage of Quick Drop. Even some experienced LabVIEW programmers I’ve spoken with seem surprisingly skeptical that Quick Drop will make them faster, and the majority of novice LabVIEW programmers weren’t even sure as to what ‘Quick Drop’ is! Consequently, I felt the urgent need to post about the value of Quick Drop and how you (yes, YOU!) can easily make the switch and improve your programming experience. If you find yourself loosing a significant amount of time fumbling through palette after palette in LabVIEW looking for some dawg-gone VI (only to mistakenly hover over the wrong item and have to start over) then please read on – my singular and unabashed goal in today’s entry is to convince you that Quick Drop (a feature you already have in any LabVIEW version after 8.6) will save you a tremendous amount of time.
It’s been said that ‘necessity is the mother of invention,’ and this was especially true of Quick Drop. The original version was written by my friend and colleague, Darren Nattinger (many of you may know him from the forums as dnatt) because he was tired of fighting with palettes to find what he needed. It’s worth noting that Darren currently has a trophy at his desk touting his place as the worlds fastest LabVIEW programmer, and his blazing fast speed is made possible by Quick Drop. If you ever want to compete with him (or if you just want to save a tremendous amount of time in your day-to-day programming experience), I highly recommend learning Quick Drop.
So what is Quick Drop? It’s an alternative to the palettes that allows you to place items (VIs, primatives, controls, indicators, etc..) by typing the name of the item you want. To launch Quick Drop at any time, simply press CTRL+Space. Like the palettes, the items that are available from this dialog depend upon whether the block diagram or front panel was active when you launched Quick Drop – unlike the palettes, Quick Drop can also place items (subVIs, controls, classes) that you have in your Project Explorer.
When you press CTRL+Space on the block diagram, you’ll see Quick Drop:
Try typing the name of a common function – for example, begin typing ‘Basic Function Generator.’ After only a few letters, the function we want will appear in the list – continue typing until Quick Drop has auto-completed the name (you should only need to type ‘Basic F’) At this point, you can quickly place this item on the block diagram by left clicking where you want it to go – to be clear, once auto-completed, you DO NOT need to explicitly click the item in the Quick Drop window. All you need to do is type the name and click once on the block diagram to place it. Note: if the item you want appears lower on the list or is not auto-completed, you can explicitly click on it to select it before clicking on the diagram to place it. However, I’ll discuss some techniques that will help you avoid this in a minute.
Once you’ve mastered this, your LabVIEW workflow quickly becomes 1) type 2) click once 3) wire 4) repeat.
In addition to quickly placing items on both the block diagram and front panel of VIs, Quick Drop provides additional functionality that can save you time with common and repetitive tasks. Take, for example, the ‘Basic Function Generator’ VI we just placed on the block diagram – for most people the next step is to wire up constants to define the signal parameters – this requires hovering over the terminal, right-clicking, and mousing-over ‘create > constant’ for every single item we want to wire in. Instead, try the following:
- left-click the VI on the block diagram to select it
- with the VI selected, press CTRL+Space to launch Quick Drop again
- once opened, press CTRL +Shift + D
- press CTRL + U
Quick Drop will run scripting code to place constants for all input terminals and wire them up. The final shortcut (CTRL+U) will quickly clean-up this newly created code. Consequently, you should now see something like this:
Think of how much time we just saved simply by using a series of keyboard shortcuts! However, we’re only just now beginning to tap the full potential of Quick Drop. Other shortcuts that you can use on selected items from within Quick Drop include (not all available in older versions):
- CTRL+D: Place and wire all controls and indicators
- CTRL+R: Remove and wire-through item
- CTRL+P: Replace selected item with auto-completed item
- CTRL+I: Insert auto-completed item on all selected wires
- CTRL+SHIFT+I: Insert a single-instance of auto-completed item and wire
- CTRL+T: Shift labels for controls, indicators and constants to appropriate locations
To fully optimize the process of finding items in this rather large list, we want to make sure that the most commonly used functions always boil up to the top. For these items in particular, we also want to minimize the amount of typing we have to do in order to find them – to this end, Quick Drop allows you to create shortcuts to specific items. Ideally, these shortcuts are all entered using the left-hand (or whichever hand typically stays on the keyboard), so that your remaining hand is always ready to immediately click and wire. You can create your own by clicking ‘Shortucts’ from the Quick Drop window, or you can copy those of the world’s fastest LabVIEW programmer, here.
Finally, in a recent Virtual User Group on Tips and Tricks for LabVIEW Development, Darren pointed out one more tip that can make the most advanced Quick Drop users even faster. LabVIEW parses a DLL containing associated keywords for each function – when you get ultra fast this search can actually slow you down (and sometime add items to the list that aren’t a perfect match). You can actually disable this keyword searching simply by adding ‘QuickDropFastSearch=True’ to your labview.ini file. For more on this (and other tidbits on Quick Drop), I recommend clicking the link above to hear Darren’s webcast.
Note: I do also want to point out that Quick Drop has significantly improved since the original version (8.6). Many of the features I mentioned are only available in later versions, and it’s gotten a lot faster. If you’ve tried it before, you may remember that it could take a very long time to open when launched for the very first time, and while not completely eliminated, this load time has been reduced significantly thanks to the fact that it (and other LabVIEW components) are now loaded in the background while the processor is idle.
I myself have made a habit of almost always using Quick Drop, and I can’t even imagine having to develop a large project in LabVIEW without it. If you still haven’t tried it, you have nothing to loose by giving it a shot – it may take some getting used to, but I promise that it’s well worth it!
As always, let me know if you have other questions or want further clarification.