LabVIEW APIs Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate Your Scripting VI Into the LabVIEW Tools Menu

Use this reference architecture to integrate your scripting VI into the LabVIEW tools menu.

refdialog.PNG

The main VI is a dialog box that allows the user to select any VI in memory and then execute a procedure upon that VI using its reference. This VI is intended to be used as an item in the LabVIEW tools drop down menu.

Without using the technique in this  reference architecture, it is not possible to get a list of VIs in memory from a VI launched from the LabVIEW tools menu. This is because normal VIs opened by the user are run in the "Main Application" context. The LabVIEW tools menu launches VIs in the "Dialog" context. The All VIs in Memory property node will not return VIs in a different context. Using this VI, you can get all VIs in the default context no matter what context this VI is run in. This is accomplished with scripting.

bd.png

The attached project includes a build specification that builds an llb to go in the LabVIEW\project directory. When that llb is placed in the LabVIEW\project directory, this dialog box will appear as an entry in the LabVIEW -> Tools drop down menu.

Stephen B
Comments
jcarmody
Trusted Enthusiast
Trusted Enthusiast
on

I use this to get a reference to the VI that was active when my scripting tool was called:

mySpringboard_BD.png

I use this in my Abort.VI to get all of the contexts and apps:
ContextsAndApps.png

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

herrlin
Member
Member
on

jcarmody

Where did you find the App.MenuLaunchApp?  I cannot find it in any of the menus of the property nodes.

Herrlin

Just trying to spread the LabVIEW love.
jcarmody
Trusted Enthusiast
Trusted Enthusiast
on

I copied it from somewhere.  The image in my first response is a snippet, so you can get it from there.

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

chris.b
NI Employee (retired)
on

Hey Herrlin - I put up an article and example on the LabVIEW Add-on Dev Center about this topic a few months back, if you're interested: Integrating into the LabVIEW Menus. I use a VI that comes with LabVIEW, so you don't have to hunt for this property node (which isn't available conveniently in LV).

Chris Bolin
LabVIEW Partner Program, CLA
Contributors