by Mark Middlebrook, www.markcad.com.
This page contains some information about AutoCAD menu files and customizing partial menus:
Note: You may not need to know all of this stuff in order to customize AutOCAD menus, but it's useful background information, and it might help you avoid or fix menu problems.
Ah, for the good old days before AutoCAD R13, when menu files were simple. There was an MNU file (the ASCII source file that you edited) and an MNX file (the binary file that AutoCAD read its menus from and compiled automatically after you made changes to the MNU file). Now we have deal with half a dozen different menu file types:
Menu source files:
If you know how to use a resource editor, you can create a custom toolbar bitmap DLL for your custom menu, but be forewarned that the procedure can be moderately complicated. I've done it with a resource editor add-in for Visual Basic, but the procedure was tedious and the resulting DLL file appeared to require a separate, large DLL that wasn't installed on all of my clients' computers. (See Creating a Toolbar DLL on the AfraLisp site.) Angus Johnson's free Resource Hacker utility appears to offer a better approach. The Creating a Toolbar DLL Re-Visited page on the AfraLisp site describes how to use Resource Hacker to create a DLL file containing AutoCAD menu bitmaps.
When you call an image tile menu from a menu macro in a partially loaded menu file, you must prefix the image submenu name with the menu group name. For example, if you were creating a base menu, you might have something like this:
In a partial menu, you change the macro that calls the image submenu (in the ***POP1 section in this example) to:
Return to www.markcad.com.
A plethora of menu files
Updated 03-Aug-2002 with more information about compiling BMP files into a DLL file and with a description of the MNL file. Thanks to Tony Tanzillo for the former and Lionel Camara for the latter.
Toolbar bitmap files:
Compiled menu files:
Menu AutoLISP file:
In short: If you're going to customize menus, get rid of any MNU files, always edit the MNS file, and make sure that custom toolbar bitmaps (BMP and/or DLL files) and the MNL file (if any) are in the same directory as the MNS file. When you load a menu file (or exit and restart AutoCAD after having loaded one), AutoCAD will gather up all the bits it needs from the MNS, BMP, and DLL files, and create the binary MNC and MNR files, from which it reads the information it needs in order to display all of your menus and toolbars.
Image tile menus in partial menu files
Image tile menus (a.k.a. "icon menus" in older AutoCAD versions) present a series of menu choices with text descriptions in a list on the left and images (or icons) on the right. In many cases, image tile menus have given way to toolbars, but image tile menus retain the advantage of showing a much larger, and therefore clearer, picture.
***MENUGROUP=MYCUSTOM
***POP1
[MyStuff]
[My Symbols]$I=MYSYMBOLS $I=*
***IMAGE
**MYSYMBOLS
[My Symbols]
[my_slb(widget_01,Widget 1)]^c^c^csome_macro_here
***MENUGROUP=MYCUSTOM
***POP1
[MyStuff]
[My Symbols]$I=MYCUSTOM.MYSYMBOLS $I=*
***IMAGE
**MYSYMBOLS
[My Symbols]
[my_slb(widget_01,Widget 1)]^c^c^csome_macro_here
Other tips
Last updated 20-Jan-2004 by
mark@markcad.com