Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Quick Drop Keyboard Shortcut - Create Place VI Contents VI

(Note: The following shortcut was originally posted by Jarrod S. on the NI Forums here.  I decided to give his shortcut a more permanent home in the Quick Drop Enthusiasts group.)

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:

  1. Save the attached VI in your <LabVIEW>\resource\dialog\QuickDrop\plugins folder.  No LabVIEW restart is required.
  2. Select something on your diagram that you wish to make into a Place VI Contents VI.
  3. Press Ctrl-Space-Ctrl-Shift-G.
  4. Specify a name for this Place VI Contents VI.
  5. Create an icon

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.)

Message 1 of 8
(18,879 Views)

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.)

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 8
(10,835 Views)

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.

-D

0 Kudos
Message 3 of 8
(10,835 Views)

Thank you.  I've gone and done it.

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

Message 4 of 8
(10,836 Views)

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.

0 Kudos
Message 5 of 8
(10,836 Views)

Thanks Helpful !

0 Kudos
Message 6 of 8
(10,836 Views)

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.

0 Kudos
Message 7 of 8
(10,836 Views)

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.

0 Kudos
Message 8 of 8
(10,836 Views)