You can add custom items to the shortcut menu of front panel and block diagram objects by creating shortcut menu plug-ins. Shortcut menu plug-ins call VIs that you customize using VI scripting. You can create custom items that appear when you right-click the following objects:
Edit-time front panel objects
Edit-time block diagram objects
Run-time block diagram objects
Refer to ni.com/lvmenus for more information about shortcut menu-plugins and for code examples from the NI Community.
Shortcut Menu Plug-In Architecture
A shortcut menu plug-in must contain the following files, where x is the name of the plug-in.
x.ctl—The type definition that specifies the objects that the plug-in affects.
x.vi—The build VI that builds the shortcut menu.
Executex.vi—The plug-in execution VI that executes when you select the custom item from the shortcut menu.
You save these files in an LLB with the plug-in name (x.llb). LabVIEW searches and loads plug-ins from LLBs in one of the following directories only. LabVIEW ignores contents of subdirectories when searching for plug-ins.
<LabVIEW Data>\PopupMenus\edit time panel and diagram—Contains LLBs of plug-ins that affect edit-time front panel and block diagram objects used by all versions of LabVIEW.
<LabVIEW Data>\PopupMenus\run time diagram—Contains LLBs of plug-ins that affect run-time block diagram objects used by all versions of LabVIEW.
labview\resource\plugins\PopupMenus\edit time panel and diagram—Contains LLBs of plug-ins that affect edit-time front panel and block diagram objects used by this version of LabVIEW only.
labview\resource\plugins\PopupMenus\run time diagram—Contains LLBs of plug-ins that affect run-time block diagram objects used by this version of LabVIEW only.
If two LLBs have the same name, the LLB in the labview\resource\plugins\PopupMenus directory takes precedence.
Creating Shortcut Menu Plug-Ins
Creating a shortcut menu plug-in consists of the following parts:
Part 1: Specifying the objects that the plug-in affects.
Part 2: Determining how the custom item appears in the shortcut menu.
Part 3: Editing how the plug-in executes when you select the custom item.
To begin creating a shortcut menu plug-in, run the following utility VI: labview\resource\plugins\PopupMenus\Create Shortcut Menu Plug-In From Template.vi
The utility VI generates the files you need for your plug-in. You customize the files to build the shortcut menu and execute the plug-in.