AutoCAD menu customization tips

by Mark Middlebrook, www.markcad.com.


This page contains some information about AutoCAD menu files and customizing partial menus:

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.

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:

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.

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:


***MENUGROUP=MYCUSTOM

***POP1
[MyStuff]
[My Symbols]$I=MYSYMBOLS $I=*

***IMAGE
**MYSYMBOLS
[My Symbols]
[my_slb(widget_01,Widget 1)]^c^c^csome_macro_here

In a partial menu, you change the macro that calls the image submenu (in the ***POP1 section in this example) to:


***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

Return to www.markcad.com.


Last updated 20-Jan-2004 by
mark@markcad.com