To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI shows the way of changing Run Time Menu of VI programmatically.
Description
There may be a situation where you need to programmatically change the Run-Time menu for your VI. For example, if you have a large VI that incorporates a few different tests, during the execution of a given test, you need to have a limited run-time menu. However, during other parts of the program, you need to have a completely different, less restrictive, Run-Time menu.
Requirements
Software:
Steps to Implement or Execute Code
1. Extract the 7z file to any folder.
2. Run the VI.
3. Flip the switch between "Menu #1" and "Menu #2".
4. Notice that the Run-Time menus change depending on the positions of the boolean switch.
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Useful Stuff!
Thanks.
Thanks for saving a lot time!
Well Done!
Please note that you can also use an RTM of your choice for controls. It needs a hack though.
1) Generate the desired swappable menu as if it was your VI menu and save it using Save->Run-Time Menu invoke node on This VI. (e.g.: MyMenu.rtm)
2) Link this RTM to your control or indicator using Advanced->Run-Time Shortcut Menu->Edit.
3) Use Save->Run Time Menu to save different menus under the same name (MyMenu.rtm). This reliably updates RTM of the control/indicator without the need top generate the menu every single time!