View Full Version : Acad 2010 menu ".mnu" format.
rick.21832
2010-01-26, 07:30 AM
I maintain my customized menu in a ".mnu" file format. (Old school, but then I started with ver: 1.4, 1984) It worked wonderfully well up through Acad 2009, but 2010... Nope. I have been unable to find any 2010 reference for the use of ".mnu" files in the AutoCAD 2010 Help file and some other places. Even so, Acad, Express, and my customized menus, including toolbars, are all loaded and working properly, thanks largely to the migration feature. However, I cannot display a pull-down menu using Lisp as before. The exact same files (Lisp, .mnu, .pgp, etc.) are accessed by both Acad 2009 and Acad 2010 (but not at the same time), and Acad 2009 still works well, while Acad 2010 has a few kinks. So this makes me look at the new .CUIx menu format in 2010.
In use, I don't use the ribbon, but swap bar menus quite often, depending on the sheet type I am using. In other words, if I am working on a site plan, an array of custom menus associated with sitework, will fill the last 5-6 menu slots. If I change to a wall section, so do the menus. However, during all swaps, the first 12 slots (basic Acad and Express) remain unchanged.
With the new .CUIx format, does this require a different ".mnu" text format? For instance, the headers in my menu might look like this:
***POP13.01 {13th menu bar slot}
**P1COVER1 {first menu in this slot}
[COVER] {menu bar visible title}
[First Item]do something
[Second Item]do something else, etc.
**P1COVER2 {second menu in the 13th slot}
[ARCH COVER] {visible title}
[First Item] etc.
***POP14.01 {14th menu bar slot}
**P1SITE1 {first menu in this slot}
[SITE] {Visible title}
[First Item]do something, etc.
Appreciate any comments, particularly where I might find a sample of a ".mnu" file that is used in AutoCAD 2010.
RB
Ed Jobe
2010-01-26, 03:20 PM
An mnu is not used at all. You can import an mnu, but after that, the placement of menus are stored inside the compiled cui, i.e cuix. It also stores the bitmap resources for the icons. No more smiley's.
msretenovic
2010-01-28, 05:22 PM
Also, take a look at workspaces for displaying different menus, toolbars, palettes, and ribbon tabs. You can control the current workspace with WSCURRENT.
Using this information, you can create a workspace specific to each condition you want to customize. From here, you only need to specify the workspace to use instead of switching everything in code yourself.
Quick example:
(setvar "WSCurrent" "3D Modeling")This will set the 3D Modeling workspace current - bringing the 3D tools out for use.
HTH,
rick.21832
2010-02-13, 01:02 AM
Ed: Thanks for your comment.
I am aware that the menus in later versions of AutoCAD are compiled, but they are compiled from a basic text file - a ".mnu" file. As stated, compiling a text file into a ".cui" file worked flawlessly up to Acad 2010. Putting the compiled files issue aside, the LISP expression: (menucmd "p14=*") should work regardless. It did previous to Acad 2010.
rick.21832
2010-02-13, 01:09 AM
Michael: Thanks for your comments regarding the workspace environment.
I have tinkered with workspaces a lot and I do not understand how they work with profiles, menus, etc. However, I have noted that changing the workspace to a new workspace does not give the same results every time, nor does it give the expected results in some cases. My preliminary conclusion is that they are not reliable, or maybe consistent is a better word. However, since my system is highly customized, I may be doing something through programming that is not apparent, giving mixed results. Joy.
rkmcswain
2010-02-13, 02:16 PM
I am aware that the menus in later versions of AutoCAD are compiled, but they are compiled from a basic text file - a ".mnu" file. As stated, compiling a text file into a ".cui" file worked flawlessly up to Acad 2010. Putting the compiled files issue aside, the LISP expression: (menucmd "p14=*") should work regardless. It did previous to Acad 2010.
I get that you probably understand this, but for the benefit of future readers, I wanted to clarify the above statements. An [.mnu] file is a text file and can be imported into 2010, but it doesn't really get "compiled" into a [.cuix] file, only transferred into a different format. Technically, [.cui] files are text files also and can be read and edited using something as simple as Notepad (not that I advise it), It's just a different format, and [.cuix] files are simply ZIP files containing multiple [.cui] and other files.
As far as pull-down menu swapping in 2010, I have not tried that yet, but would not be surprised if Autodesk removed this capability since pull-downs, toolbars, etc are being phased out.
rkmcswain
2010-02-13, 02:26 PM
I have tinkered with workspaces a lot and I do not understand how they work with profiles, menus, etc. However, I have noted that changing the workspace to a new workspace does not give the same results every time, nor does it give the expected results in some cases. My preliminary conclusion is that they are not reliable, or maybe consistent is a better word. However, since my system is highly customized, I may be doing something through programming that is not apparent, giving mixed results. Joy.
I tend to agree. In theory, workspaces should do what you (and everyone else) needs as far as swapping menus around. But there are so many variables, like...
* "did the workspace get saved before switching from it..." and
* "did that toolbar I opened but don't need any longer get saved into my workspace"
* the issue of AutoCAD only remembering the first 24 pull-down menus. So if you have more than 24 visible, and close AutoCAD (with a saved workspace), then open AutoCAD, only the first 24 are restored, even though the workspace you had saved appears to be set current (as far as I know, you still have to use this workaround (http://usa.autodesk.com/getdoc/id=TS1054770))
* How does it handle items placed on a second monitor when the second monitor is not available any longer (such as when a laptop is undocked)
...etc.
If you are a straight up vanilla AutoCAD user with two simple workspaces, then WS switching probably fulfills your needs, but for more complex setups and vertical applications with multiple 3rd party add-ons, etc. - the perception is as you say "not consistent".
msretenovic
2010-02-13, 03:56 PM
A couple of notes - see comment below in red:
* "did the workspace get saved before switching from it..."
Make sure the option to automatically save is turned off and do your saves explicitly
* "did that toolbar I opened but don't need any longer get saved into my workspace"
Same as above :)
* the issue of AutoCAD only remembering the first 24 pull-down menus. So if you have more than 24 visible, and close AutoCAD (with a saved workspace), then open AutoCAD, only the first 24 are restored, even though the workspace you had saved appears to be set current (as far as I know, you still have to use this workaround (http://usa.autodesk.com/getdoc/id=TS1054770))
* How does it handle items placed on a second monitor when the second monitor is not available any longer (such as when a laptop is undocked)
My experience has been that it places the items on the second monitor - even if it is NOT there :banghead: This has caused me some grief. If you are making a company wide change, try to keep it all on one monitor. ;)
I'm sure there are many other options you will need to consider in your environment, but I would not discount their use until you have considered how you want to use them.
Well, HTH anyway. :)
rick.21832
2010-02-13, 11:08 PM
I get that you probably understand this, but for the benefit of future readers, I wanted to clarify the above statements. An [.mnu] file is a text file and can be imported into 2010, but it doesn't really get "compiled" into a [.cuix] file, only transferred into a different format. Technically, [.cui] files are text files also and can be read and edited using something as simple as Notepad (not that I advise it), It's just a different format, and [.cuix] files are simply ZIP files containing multiple [.cui] and other files.
As far as pull-down menu swapping in 2010, I have not tried that yet, but would not be surprised if Autodesk removed this capability since pull-downs, toolbars, etc are being phased out.
Thanks for the info. I agree that "compiled" is not the proper way to describe the menu transition to the ".cui" menu format. I have played around with the cui fomat a little, and concluded it is a lot easier to modify the good old ".mnu" format and let Acad make the transition. I have looked at the ".cuix" format only once, and gave up on it. I did think it was compiled and am glad to know that what I saw was "zipped". How did you figure that out?
To address your comment about menu swapping, that doesn't seem to be a problem. I can do that successfully in all versions including 2010. I can pull down the menu (display) manually, but the LISP expression (menucmd "p14=*") in 2010 will no longer display the current menu shown on the menu bar - even the "out-of-the-box" Acad menus that haven't been altered or swapped. However, using the same customized LISP and ".mnu" files in A2009 is not a problem.
As an aside, I worked in a building at the intersection of Buffalo Speedway and SW Freeway (NE corner) many years ago (1970). Google earth shows me the building I worked in has been replaced with a gold domed building now.
rkmcswain
2010-02-13, 11:10 PM
A couple of notes - see comment below in red
Yes, I know the answers to those questions, but for a novice and/or someone new to AutoCAD, the answers that we know are not so apparent. That was my point (and I think Rick's) about workspaces - they don't always behave like you think or would expect.
rkmcswain
2010-02-13, 11:20 PM
I have looked at the ".cuix" format only once, and gave up on it. I did think it was compiled and am glad to know that what I saw was "zipped". How did you figure that out?
Inside information...? plus I right-clicked on it one day and chose "Open Archive" and voila! (Using 7-ZIP)
As an aside, I worked in a building at the intersection of Buffalo Speedway and SW Freeway (NE corner) many years ago (1970). Google earth shows me the building I worked in has been replaced with a gold domed building now.
Wow. The building with the gold dome was a bank at last check (many years ago), but that has been there as long as I can remember. Of course I only went by there back in the 80's while going to concerts or sporting events at the Summit. Of course the Summit is now Lakewood Church, and I very rarely travel down 59 these days. Maybe you can find your old building on http://www.historicaerials.com/
msretenovic
2010-02-14, 12:10 AM
Yes, I know the answers to those questions, but for a novice and/or someone new to AutoCAD, the answers that we know are not so apparent. That was my point (and I think Rick's) about workspaces - they don't always behave like you think or would expect.
I figured you would already know these answers, just wanted to point it out for others to be aware of. :) :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.