NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here:
NI Home > NI Developer Zone > NI Discussion Forums


LabVIEW
Register  ·  Sign In  ·  Help
Jump to Page:   1
  Reply   Reply  

Darren's Weekly Nugget 08/03/2009
Options    Options  
Proven Active Veteran Darren
Proven Active Veteran


Darren

Message 1 of 6

Viewed 1,891 times


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.


 

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
15
Kudos!
08-03-2009 07:11 PM

All Users' Tags:

  Reply   Reply  

Re: Darren's Weekly Nugget 08/03/2009
Options    Options  
Proven Veteran Zbigniew StS
Proven Veteran


Zbigniew StS

Message 2 of 6

Viewed 429 times


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? 

 


 

Regards
Zbigniew St. Sobków, LabVIEW Champion, CLD, CPI
AGH UST Dep. of Electronics, Poland
_____________________________________________________________________________
"You can lead a horse to water, but if you can get him to float on his back you've got something."
Kudos!
01-07-2010 02:44 PM
  Reply   Reply  

Re: Darren's Weekly Nugget 08/03/2009
Options    Options  
Proven Active Veteran Darren
Proven Active Veteran


Darren

Message 3 of 6

Viewed 417 times


There is currently no G-based way to assign keyboard shortcuts to VIs that appear dynamically in the menus.  Any G-based menu items that ship with LabVIEW required modifications to LabVIEW source code to get keyboard shortcuts.
 

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Kudos!
01-07-2010 03:01 PM
  Reply   Reply  

Re: Darren's Weekly Nugget 08/03/2009   [ Edited ]
Options    Options  
Proven Veteran Zbigniew StS
Proven Veteran


Zbigniew StS

Message 4 of 6

Viewed 411 times


 
I will reply myself :smileywink:
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 :smileyhappy: 

Message Edited by Zbigniew StS on 01-07-2010 03:16 PM

 

Regards
Zbigniew St. Sobków, LabVIEW Champion, CLD, CPI
AGH UST Dep. of Electronics, Poland
_____________________________________________________________________________
"You can lead a horse to water, but if you can get him to float on his back you've got something."
Kudos!
01-07-2010 03:07 PM
  Reply   Reply  

Re: Darren's Weekly Nugget 08/03/2009
Options    Options  
Proven Active Veteran Darren
Proven Active Veteran


Darren

Message 5 of 6

Viewed 404 times


Oh, that's cool, I've only ever added G-based menu items to the Tools menu, so I didn't consider that it would (almost) work for File/Help menus.
 

Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Kudos!
01-07-2010 03:18 PM
  Reply   Reply  

Re: Darren's Weekly Nugget 08/03/2009
Options    Options  
Proven Veteran Zbigniew StS
Proven Veteran


Zbigniew StS

Message 6 of 6

Viewed 383 times


And behaviour LabVIEW2009: Tools> Options > Menu Shortcuts  - self-made menu items (ours VIs) are not shown in menus tree, but exist in menu.
 

Regards
Zbigniew St. Sobków, LabVIEW Champion, CLD, CPI
AGH UST Dep. of Electronics, Poland
_____________________________________________________________________________
"You can lead a horse to water, but if you can get him to float on his back you've got something."
Kudos!
01-07-2010 03:42 PM
Jump to Page:   1
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.comâ s copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2010 National Instruments Corporation. All rights reserved.