08-17-2009 08:25 AM
Using LV 8.5, I want to change the menu bar of my VI programmatically. I am not using Edit >> Run-time Menu...
I've deleted almost all the default menu items ("File", "Edit", etc.) except "Help", then inserted my own "Config" menu.
In the IDE it works great; when I make an executable my menu does not appear. Instead, the default items
I deleted are indeed gone and the only item showing is "Help".
What am I doing wrong? I've looked at the posts where it says to add an item name and item tag and I've looked at all the
LV examples for adding a menu. Things are fine until I build the executable and then my little menu item just doesn't show up.
There's no reason why I could not use Edit >> Run-time Menu... but I figured I could do it programmatically. Just trying to figure out what is causing my menu to not appear.
Solved! Go to Solution.
08-17-2009 09:58 AM
08-17-2009 10:52 AM
Yeah, that was a good idea. I added that VI to my build path and created a standalone exe. It seems to work, so that leaves my code.
Attached is a screenshot of the menu insertion sequence. It's the very first thing in my program. In a later sequence, I use an event structure to detect "Menu Selection (User)".
I've also played with File >> VI Properties >> Screen Appearance. I've attached a screenshot of that, too.
08-17-2009 11:04 AM
The demo VI has the entire menu bar erased then a few items are added back in. In my code, I chose to erase most of the menu items but not all, so as a test I deleted all the menu items and now it shows my custom menu item after I build and then launch the exe.
08-17-2009 11:33 AM
08-17-2009 12:11 PM
I added Simple Error Handler.vi to the error bus of the chain and now I see "Error 1162 -> Labview: Cannot find one or more tags." This error does not appear when I'm in the Labview IDE.
Dude, thanks for this great debug, but can you give me a clue as to how to add my custom menu and keep the "Help" application menu? Since I did not see an error in the IDE I "assumed" Labview was happy.
When it comes to system I/O is it a good idea to assume simulation will not work in the IDE?
08-17-2009 12:16 PM
08-17-2009 12:24 PM
Yet another good tip -- will make error handling more visible in the future.
I did find it. Apparently, one of the tags I'm removing exists in the IDE but not in the runtime menu: "Project". Apparently, after this it just stopped processing menu bar code.
I do appreciate the help.