LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set runtime-menu during execution

Hi all
 
I'm just playing around with dynamic runtime-menus and discovered the following behaviour:
1. I run a vi with its default menu
2. I select a ring to change the menu
3. The path of the menu is generated and wired to the RT Menu Path property of the Class "VI Server.VI"
4. Selecting a new menu the first time changes it, afterwards it remains the last menu, until I select a menu item. Then just this item changes to the new one.
 
This confused me, because in the property help is written:
... If the VI is running when you write this property, it updates the menu with data from the new path. Use this property to programmatically specify the path for a run-time menu (.rtm) file. ...
 
 
Attached is a zip containing the vi and 3 rtm files, which show this.
 
I use LV7.0 on WinXP profesional.
 
Do you see the same behaviour?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 1 of 7
(4,133 Views)
Hello Thomas,

same behaviour on LV7&LV7.1 on W2k 😞

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(4,115 Views)

Hi,

     I think the menu is updated as wrote new .rtm file, but not refreshed. I have tried to clear menu (use delete menu items.vi)  before to write *.rtm for it. it can be updated quickly.

帖子被Yukee在01-11-2006 03:30 AM时编辑过了

________________________________________________________


Try to make everything Automatic
0 Kudos
Message 3 of 7
(4,112 Views)
Nice workaround, but if I run the vi (either as VI or as application) it sometimes does not update the menu. The it is just deleted.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 7
(4,102 Views)
Yes, sometimes, it seems that hasn't written any data for it. but we cann't get any error infoes about....
 
________________________________________________________


Try to make everything Automatic
0 Kudos
Message 5 of 7
(4,102 Views)
I checked and this issue has already been reported to R&D and fixed in LabVIEW 8.  I know this doesn't help if you don't have 8, so one workaround would be to turn the menu bar off then back on again to force a redraw.  This is kinda annoying since it does cause the VI to flicker, but this is probably the fastest way to do it.  If you select the VI class, you can access the Front Panel Window >> Show Menu Bar property. 

Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
Message 6 of 7
(4,082 Views)

That's a great answer.

I'm about to switch to LV8.0 in a few weeks, so I don't have to worry anymore Smiley Wink.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 7
(4,059 Views)