This Quick Drop Keyboard Shortcut allows you to create a Place VI Contents VI (formerly called a "Merge VI") of your diagram selection and automatically create a user.lib palette entry for it, so that you can easily drop that selection of code in the future. Follow these steps to use this shortcut:
Now you have a Place VI Contents VI that contains this diagram selection that you can use from your palettes (or Quick Drop). Note that in step (3) above, if you had pressed Ctrl-Space-Ctrl-G instead, the palettes would not be refreshed automatically, and you would have to restart LabVIEW in order to use the new Place VI Contents VI.
Note: All Place VI Contents VIs that are created with this shortcut are stored in <LabVIEW Data>\QuickDrop Templates. The actual .mnu files that provide the palette entries are stored in <LabVIEW>\user.lib\QuickDrop Templates Palette.mnu.
This shortcut works in LabVIEW 2009 and later.
2010.07.09 - added code to open the icon editor before saving (Thanks, Mark Balla. I copied the functions from your SubVI Fixer.)
I love this..Thank you. I think it would be nicer if the icon editor was presented before the new VI was saved.
(The BD is protected with a password, otherwise I'd take a stab at it myself.)
There was really no reason for that VI to be password-protected. I have removed the password. I have also added you as an admin on the document, so if you add the ability to edit the icon, feel free to update the document.
Just noticed that if terminals in the selection are defined as VI Connector terminals, then in some instances the created template may have broken wires. Will try to define specifically when. Hmm, doesn't appear to repeat. It only happened the first time I used this. I made a quick VIG with numeric in and out, error terminals, Action ENUM and wired the terminals to the VI Connector corners, did not save the VI, just selected everything from the block diagram and ran the QD. Everything looked okay, until I tried to drop the contents, then everything showed up except the wires from the diagram terminals to the While loop terminals in the dropped code. The wires were not broken, they were missing. The wires on the inside of the VIG While loop were present and broken.
I'll post again if I can get this to recurr.
Hi guys and thank you for sharing. I couldn't figure out one thing. Once a QuickDrop template has been created, how can it be removed? I have tried deleting it from the "QuickDrop Templates" folder which didn't work, and looked through the various options on the palette window without success.
The QuickDrop Templates palette (that facilitates this plugin) is set to synchronize to directory. So if you have already deleted the plugin VI from [LabVIEW Data]\QuickDrop Templates, then you can either (1) restart LabVIEW, or (2) drop a Refresh Palettes method from Quick Drop and run the VI, which will refresh the palettes and reflect the removed Place VI Contents VI.
Note: If you have set up an object shortcut for the Place VI Contents VI that you want to remove, then you will also need to click Configure in Quick Drop and go to the Front Panel or Block Diagram tab and remove the object shortcut you created.