LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform chart shortcut menu problems

Solved!
Go to solution

Hi,

 

we discovered a problem regarding shortcut menus on waveform charts with our current LV2009f2 installation.

 

In the development environment ("IDE") we created a larger application. In the display section we have several (waveform) charts, where the user can select the plotted signal by right-click menu (aka shortcut menu). When running the app in the IDE everything is fine, menus are shown with all items we defined.

 

So we finished debugging (atleast we thought so) and created an executable. Then we tested the executable on the same computer (the computer with full installed IDE). Everything if fine here, shortcut menus are shown as expected.

 

So we got to next stage of creating an installer package (which resulted in a size of 0.99GB btw...). LabVIEW made no complains and we successfully installed that application (using the installer) on a fresh, clean computer. No problems so far, our app started, everything was fine. But then we tried to change the display: NO SHORTCUT MENUS!!! Instead we got error 1165 (problems with Insert to Menu, "Cannot find the menu"). What's happening here? Anyone with a clue? Where is my menu (reference) gone?

Ok, we took a second computer. Installing that 0.99GB package too. Starting the app: everything is fine, except the missing shortcut menus!

 

More information:

All computers are WinXP, same ServicePack. Shortcut menus require no RTM files, thus no missing additional files in the installer package. Menu references are created by LabVIEW (IDE or RuntimeEngine [RTE]) on mouse right click on the control, so there should be no problem with missing/wrong reference. The values provided to build the menu are the same for IDE and RTE, so no difference. The charts are embedded in a subpanel, but we still got events for them, thus should be no problem. Again: the menu reference is provided by LabVIEW (event "Shortcut menu activation", MenuRef), so it should be valid...

 

Sorry, no example. It is hard to reproduce, when it only happens in the RTE and only on computers, where no IDE is installed...

Tomorrow we will fill up the VI for menu creation with a lot of debug message subVIs to check for all and everything going on in there...

Message Edited by GerdW on 12-16-2009 09:53 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 1 of 14
(7,201 Views)

Hi,

 

some more testing, clarification and results:

Our waveform chart has it's own shortcut menu (and so it's associated RTM file). The vi with the chart is inserted in a subpanel container of our main vi.

When we refresh the shortcut menu we have some "static" items, where we only set or unset the checkmark. One item of the menu opens a submenu, where we would like to insert a list of possible signals to select. All this runs fine in the IDE and in the RTE on the same computer.

 

When we deploy the app to a different computer it seems our custom RTM of the chart is lost and so several errors are thrown:

- "Set Menu Item Info" can't find the menu item it should checkmark, giving error 1162

- "Insert Menu Items" can't find it's menu tag and so gives error 1165

 

The VI with the chart has "Allow default run-time shortcut menus" disabled (we only want to show our custom RTM). When enabling this option the default shortcut menu of the chart is shown - that would explain why our routine can't set/insert items: because they aren't exisiting... We already included the custom RTM file in the app as "always included", so it should be present.

Best regards,
GerdW


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

Gerd,

 

i am a bit confused. In your initial post, you wrote:

Shortcut menus require no RTM files, thus no missing additional files in the installer package. 

 

This would imply that when changing the RTM for the control, you selected "Save with Control" when the change was done.

 

In your second post, you write that you have a dedicated RTM file for the control. So what was exactly done?

 

Next question: The exe brought up the context menu as desired on the developement system. And i understood it also created the correct context menus on other PCs where LV ADE was installed (have there already been sources of this project on them??)

But on PCs where you just installed the RTE, the context menu was not loaded and the default menu or non was displayed (depending on the setting of the control).... 

 

One thing you can try is to set the option "Use LabVIEW 8.x layout" when building the exe. Does that change the behavior?

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 14
(7,157 Views)

Hi Norbert,

 

yesterday evening I was a little bit tired from bug hunting...

 

So my last message (#2) is correct. I even found more information:

In the deployed exe we get either an empty shortcut menu (allow default runtime shortcut menu disabled) or the standard menu (default enabled). It seems the RTM of the chart is lost/forgotten.

 

And I use LV2009 exe layout as we also call VI dynamically, which is rather easy then...

 

Now I will test for an empty menu (so I know it's an deployed exe) and will then insert the menu items from scratch...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 14
(7,154 Views)
Solution
Accepted by topic author GerdW

Hi Norbert and others:

 

I found a solution for my problem (after long session of creating exe, deploying to different computer, debugging, and starting over again...).

 

In the deployed executable the shortcut menu for the chart is missing (and it's missing only here!). So I first test for an empty menu on each menu activation and create a new menu if necessary. To make this work you have to switch off (disable) "default runtime shortcut menus" for the VI containing the chart.

 

One more note:

All other RTMs (VI menus otherwise) are loaded correctly, all dynamically loaded VIs are working. It's only the shortcut RTM that's missing... (And the RTM file is set to "always include" in the app builder!)

 

 

Message Edited by GerdW on 12-17-2009 02:48 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 14
(7,144 Views)

I had a similar problem with run-time menus in LV851 with a similar hierarchy:

Main.vi --> Dynamic VI Server to load subpanel VI

Subpanel.vi --> Waveform Graph (with custom SC menu)

 

At that time (9+ months ago), NI noted that the issue I was facing was a known problem with the AppBuilder that required the file path to the RTM file to be *exactly* the same from the IDE to the Run-time App.  I did customized the control and created a static menu, which is saved with the control.

 

I am now upgrading my waveform graphs into X Controls and have to revisit this issue, so I will try your suggestion to create/open menus at first look.

Message 6 of 14
(6,955 Views)

I am having the same problem. I cant figure out how to make the control have a custom menu. It worked in labview 8.5.1. Now using the same executable in 2011 I am having problems.  I can't just delete the control and replace it because its linked to way too many property nodes. In the development environment it works. In the executable it doesn't work. I have it set up like i always have of including it in the build, which has worked for the last 3 years. I also don't know about creating it each time through because it uses the last case for checkboxes and other things. Does anyone have a bettter idea that i cannot find.

0 Kudos
Message 7 of 14
(6,222 Views)

Hi Gerd -

 

You said: "So I first test for an empty menu on each menu activation and create a new menu if necessary."

 

Can you go into more detail on the steps you used to do this?  Specifically, how did you test for an empty menu? And how did you create a menu at run-time, and do the choice of items contain all of the items available in the right-click menu of the control in the development environment?

 

Thanks,

 

Don

 

 

0 Kudos
Message 8 of 14
(6,144 Views)

Hi Don,

 

- "test for empty menu": you can get a list of all menu items - when the list is empty the menu is empty...

 

- "create menu at runtime": you can set menu items at runtime, it's just a little bit of work...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 14
(6,141 Views)

Ok, I have done both of these things for custom run-time menus so I know now what you are talking about.  But you say:

 

"To make this work you have to switch off (disable) "default runtime shortcut menus" for the VI containing the chart."

 

How do you get the reference to right-click menu at run-time if you have disabled the right-click menu?  Because in my tests, the event is not activated (which you need to happen in order to get the reference to the right-click menu) if you have disabled the right-click menu.

 

Thanks,

 

Don

0 Kudos
Message 10 of 14
(6,131 Views)