LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace a VI's default menu with a custom menu?

After making some changes to my application, my custom Run-Time Menu for some VI have been replaced with the Default Run-Time Menu. I still have the *.rtm files.
0 Kudos
Message 1 of 2
(2,581 Views)
The path the custom menu is saved in the VI relative to itself. If you move the VI, saving to an .llb or building an executable moves it since the path changes, the VI can no longer find its menu.

You can dynamically build a path the menu by getting the current VI�s path and checking to see if it has an .llb or .exe in it. If it does, start stripping the path until you get to a folder, then add the menu filename so you have the correct, absolute path to the menu file. Then drop a property node set to the �VI� server class and set the property to �Run-Time Menu Path�. Connect the path you built to this and the VI will always be able to find its menu.

If this isn�t the problem, the menu file must have been corrupted and will need to be rebuilt.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 2 of 2
(2,581 Views)