LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy a Menu Bar from one UIR file to another?

How can I copy a Menu Bar from one UIR file to another? Seems simple, but I'm stumped. That paste button is always dimmed when I need it!
 
I get the impression that a special CVI clipboard is used to copy & paste them, and its scope is just one UIR file.
 
I even tried copying between two instances of CVI - no go.
 
Ideas?
0 Kudos
Message 1 of 5
(3,521 Views)

Well, there could be a trick to do what you want, a little bit of handwork and I don't know if it can be guaranteed all times, but it has worked for me in some occasion so I am passing it to you.

Saving your UIR files in text format (Options >> Save in text format menu item) .TUI files are produced which can be modified with a text editor. Elements from one file can be copied to another TUI file.

Be careful to avoid duplicated names: TUI format for menubars is [MenuBarxxx] : xxx is a 3-digit number that must be unique throughout the whole TUI file so you may need to change it if copying a menubar to a TUI file that already have some menus in it. xxx number must be updated on all menus and menu items of the copied menu.

After all corrections are made, you can reload from text format and have your UIR file modified with the menu bar in it Smiley Wink



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(3,508 Views)
How about the following:
1. Copy a panel that has the menubar in question.  This might require the creation of a dummy panel.
2. Paste the panel into the other UIR file. 
3. A pop-up should open pointing out that the menubar is missing from the UIR file and asking if you wish to paste this too.  Pressing the yes button should get you what you want.
Message 3 of 5
(3,479 Views)
Brilliant! Thanks Dave.
 
My menubars typically are standalone and are not tied to a panel in the UIR file, so I had never seen that.
 
--Ian
0 Kudos
Message 4 of 5
(3,454 Views)

Good solution indeed! I never saw this too! Smiley Surprised

Message Edited by Roberto Bozzolo on 02-02-2007 11:06 AM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 5
(3,436 Views)