LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Quick Drop and Class Name

Let's say I have some API VIs in a palette, they all belong to the same class ("Demo Class.lvclass"):

_carl_1-1675707974684.png

 

I'd like to access them in Quick Drop, ideally by typing in the name of the palette/class that they're in:

_carl_0-1675707959274.png

But....they don't show up.  Worse yet, typing "Initialize" or "Close" won't get be there either because these names are too generic.

 

Is there a way to get these VIs to show up when searching for the class/library/palette that they're in?

 

I'd love to have a list that shows:

- "Demo Class.lvclass:Initialize.vi"

- "Demo Class.lvclass:Do Stuff.vi", etc.

 

(or "Do Stuff [Demo Class.lvclass]")

 

The only thing I can think of is to change the actual name in the palette to match the format above, but...that seems like a) a lot of hard-to-maintain work and b) less than ideal given that now they'll have uglier names in the palette.

0 Kudos
Message 1 of 15
(1,573 Views)

One option would be to press Configure... on the Quick Drop popup and add custom block diagram shortcuts for each of those:

Spoiler
FireFistRedhawk_1-1675712786452.png

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 2 of 15
(1,551 Views)

If the VIs in your palette are members of a library or class, the library/class name will appear in brackets after the VI name in Quick Drop:

 

qd.png

 

This assumes you have not modified the VI window titles and/or palette item short names in the .mnu file that defines the palette.

Message 3 of 15
(1,538 Views)

So that's what I would have expected/hoped for, but it doesn't seem to work that way. In this case, this was a new class I created to demonstrate the behavior, and I haven't changed the auto-generated palette (.mnu) for it, or the VI name.

_carl_1-1675720063835.png

_carl_2-1675720137111.png

_carl_0-1675719950051.png

 

0 Kudos
Message 4 of 15
(1,526 Views)

Can you describe the procedure you used to generate the palette for the class?

0 Kudos
Message 5 of 15
(1,522 Views)

@Darren wrote:

Can you describe the procedure you used to generate the palette for the class?


Sure.
1. Create new class directly in its own folder in instr.lib:

_carl_0-1675723347256.png

2. Restart LabVIEW.

3. Palette automatically shows up in "Instrument I/O"->"Instr Drivers"->"Demo" (the folder I created).

 

Looks like it didn't create a .mnu file.

 

 

0 Kudos
Message 6 of 15
(1,514 Views)

It looks like auto-populated palettes (i.e. those that aren't defined by a .mnu file) don't grab the namespace for the VIs like all other palettes do. For example, the Agilent 34401 palette (also in instr.lib) does use a .mnu file, and as a result, it appears to get the namespaces in Quick Drop.

 

I'd say the workaround here would be for you to define the palette for your class in a simple .mnu file.

0 Kudos
Message 7 of 15
(1,507 Views)

That doesn't seem to make a difference.  I created a menu file by editing the palette through the palette editor (it auto-generates a .mnu file in the folder if you save your changes), and...after restart, still behaving the same.

0 Kudos
Message 8 of 15
(1,495 Views)

Ugh, what a mess. So it looks like a bug with auto-populating palettes conflicting with using a .mnu file. I managed to get Quick Drop to display the owning library name for a VI that is in an .lvlib in instr.lib, but not a VI that is in an .lvclass:

 

lib1.pnglib2.png

 

Message 9 of 15
(1,488 Views)

Interestingly, I can't even reproduce that:

_carl_0-1675789855216.png

Edit: Also tried creating and adding the dir.mnu to the .lvlib, and selecting that as the default palette, saving, restarting LabVIEW.  Same result: just has the VI name in Quick Drop.

 

0 Kudos
Message 10 of 15
(1,409 Views)