08-03-2009 07:11 PM
One helpful LabVIEW feature that add-on developers frequently utilize is the fact that you can place VIs in the [LabVIEW]\project folder to create new entries in the Tools menu. Did you know that you can also place VIs in the [LabVIEW]\help folder to have them appear in the Help menu? Or the even less well-known [LabVIEW]\wizard folder to have them appear in the File menu?
This functionality has been around for a long time, and there are even some private VI Server properties that help you determine the VI from which the menu option was selected. In LabVIEW 2009, I added a VI to vi.lib that will give you this information (it basically just wraps the private properties). Check out [LabVIEW]\vi.lib\VIServer\Menu Launch VI Information.vi. This VI will return the App reference of the owning app for the VI from which the menu item was selected, along with the VI name. You can then wire these items to an Open VI Reference function to gain access to the VI from which the menu item was selected.
01-07-2010 02:44 PM
Very good nuget.
But there is a question: how could I assign a keyboard shortcut to so represented in, let's say File menu, VI?
01-07-2010 03:01 PM
01-07-2010 03:07 PM - edited 01-07-2010 03:16 PM
I will reply myself 😉
Checked/works in LabVIEW 8.6:
File and Help - menu: Tools>Options> Menu Shortcuts
There is no such option for Tools menu
And observed behaviour: defined this way shortcut is active only in this session LabVIEW - shortcut disappear after LabVIEW restarting, item in menu still existing 🙂
01-07-2010 03:18 PM
01-07-2010 03:42 PM