LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does a custom run-time menu disappear from the Export String when I attempt to change it and save it programmatically?

I am attempting to change the run-time menu programmatically from a separate file that uses a RT Menu Path Property followed by a Save Instrument Method (see attached). The run-time menu is changed correctly, but when the save occurs, it disappears from the Export String. To test this, I manually save the program with the custom menu, then open and change it to the default menu and resave. I run my external program, which corrupts the RTM path as seen when exporting strings to a text file. This problem occurs both in LabVIEW 6.1 and LabVIEW 7.0.
Download All
0 Kudos
Message 1 of 8
(3,296 Views)
I ran your programs in LabVIEW 6.1. When I exported strings the only difference I saw using the default menu was:

and the following when using your run time menu:
CDocuments and SettingsjbradenDesktopNew Foldertestb_6.1.rtm

Am I seeing what you see? Please explain exactly the problem--what you see and why it is wrong.
Message 2 of 8
(3,296 Views)
If you run Change Menu.vi, you should find that the script will change to:. Now when you open the test program, it can no longer find a run time menu and will ask you to open the default menu. Make sure the test program is not open when you run the Change Menu.vi
0 Kudos
Message 3 of 8
(3,296 Views)
EJS,
To get this method to work, you need to open the front panel of that VI before the RT Menu Path (using the Open FP Invoke Node) and close it after the Save Instrument (using the Close FP Invoke Node). In order to prevent the Front Panel of your second VI of flashing, set the State input of the Open FP Invoke Node to 'Hidden'. I hope this helps. Please let me know how that goes.

Gustavo Valdes
Applications Engineer
0 Kudos
Message 4 of 8
(3,296 Views)
This solution works well for LabVIEW 7.0, though it is a work around. Unfortunately these methods are not available for LabVIEW 6.1. I can use properties to open and close the Front Panel allowing the RT Menu to update, but cannot prevent the Front Panel from flashing. Is there a better work around for both Platforms?
0 Kudos
Message 5 of 8
(3,296 Views)
Just a guess. Maybe it is not required that the FP be opened but just loaded in memory before the save. In 6.1, find a property/method that requires the FP into memory (such as Edit Mode on Open) and use it before saving the VI.


LabVIEW, C'est LabVIEW

0 Kudos
Message 6 of 8
(3,296 Views)
That was a good guess. The Edit Mode property works for both platforms. Thanks!
0 Kudos
Message 7 of 8
(3,296 Views)
You're welcome.

You should report this to NI as a bug.


LabVIEW, C'est LabVIEW

0 Kudos
Message 8 of 8
(3,296 Views)