LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 11/23/2009

Did you know you can configure VIs on the palettes to drop the contents of the VI, instead of the VI itself, when dropped from the palettes or Quick Drop?  When you are editing the palette file that contains the palette VI in question, you can select Place VI Contents in its right-click menu to enable this functionality:

 

place_vi_contents.png

 

Some notable Place VI Contents VIs you might see in the LabVIEW palettes include the Word Constants (seen above),  the JKI State Machine, and even the True Constant

 

Historical NotePlace VI Contents VIs used to be called Merge VIs.  But when we added the ability to "merge" VIs in LabVIEW 8.5, the name was changed to Place VI Contents to avoid user confusion over the two very different features.

Message 1 of 9
(12,155 Views)

Place pre-formed structures quickly with Place VI Contents...

 

 

 

Message Edited by Broken Arrow on 11-23-2009 01:26 PM
Richard






Message 2 of 9
(12,116 Views)

Darren wrote:

Did you know...


You do if you read nuggets... 😉


___________________
Try to take over the world!
Message 3 of 9
(12,086 Views)

This thread inspired me.

 

I love the Place VI Contents option, but (and there's always a but) it is simply too cumbersome to go through the process of creating a VI with the template information and adding it to the palettes. Maybe not hard, but cumbersome and annoying. This ends up meaning that I rarely use this really nice feature, because I never have the time to stop what I'm doing and throw away 15 minutes, even if it saves me time down the road.

 

So... I decided a QuickDrop plugin would be a great way to solve this. I created a plugin for the letter G which does the following:

 

  1. Copies the current block diagram selection.
  2. Prompts you to specify a template name.
  3. Pastes it to a new VI and saves it according to your name.
  4. Adds this item to a QuickDrop Templates palette and sets it to Place VI Contents.
  5. If Shift was pressed (Ctrl-Shift-G), refresh the palettes immediately. Otherwise they will refresh when you reload LabVIEW.
I'm attaching it below (LV2009). It saves the VIs created in a folder <LabVIEW Data>\QuickDrop Templates. It saves the palette in user.lib so it will link in automatically. Just copy the attached VI to <LabVIEW 2009>\resource\dialog\QuickDrop\plugins. If you already have a G plugin, select a new letter. To use it, just select something on a block diagram and select Ctrl-G or Ctrl-Shift-G.
Message Edited by Support on 11-23-2009 04:22 PM
Jarrod S.
National Instruments
Message 4 of 9
(12,052 Views)
I forgot a step in the directions. Select something on the block diagram, then hit Ctrl-Space to launch QuickDrop followed by Ctrl-G or Ctrl-Shift-G to activate the QuickDrop Template plugin.
Jarrod S.
National Instruments
Message 5 of 9
(12,032 Views)
That is a very cool shortcut, Jarrod.  I just tried it out and it works great!
0 Kudos
Message 6 of 9
(12,003 Views)

Hay Darren,

 

Nice Nugget

 

Ohiofudu

Certified LabVIEW Architect.
Ohiofudu Israel

0 Kudos
Message 7 of 9
(11,858 Views)

Could you modify it to present the icon editor before saving the new VI?

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 8 of 9
(10,454 Views)

@jcarmody wrote:

Could you modify it to present the icon editor before saving the new VI?


It's done, and available in the Quick Drop Enthusiasts Community (here).

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 9 of 9
(10,431 Views)