Menu source files:
- menuname.MNU: Menu template or "pre-source" file. The MNU file is a vestige from the old MS-DOS days, when it was the file that you'd edit in order to customize a menu. It's only purpose now is to confuse you and to give AutoCAD the opportunity to obliterate your menu customization. You should delete it and edit the MNS file instead.
- menuname.MNS: Menu source file. The MNS file is the real menu source file: an ASCII file that you edit with a text editor in order to customize menus. This also is the file that the Toolbars dialog box modifies, if you're foolish or brave enough to try to use it to customize your toolbars. Note that, under certain circumstances, AutoCAD will create an MNS file from the MNU file automatically. This attempt to be helpful can overwrite important changes in the MNS file. That's why you don't want to have an MNU file.
Toolbar bitmap files:
- bitmapname.BMP: A graphics file containing a single toolbar bitmap (i.e., one lousy, little button). If you create custom toolbars, you usually end up with dozens of these things.
- ACADBTN.DLL: A Windows resource file containing the standard AutoCAD toolbar bitmaps, all bundled into a single file. This is a standard AutoCAD support file, and it lives in the AutoCAD program directory.
- menuname.DLL: A Windows resource file containing custom AutoCAD toolbar bitmaps, all bundled into a single file. The advantage of this kind of file is that it replaces the dozens of little bitmapname.BMP files. If you have a third-party application that includes its own toolbars, it might come with a menuname.DLL file instead of a bunch of bitmapname.BMP 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. Angus Johnson's free utility appears to offer a better approach. The page on the AfraLisp site describes how to use Resource Hacker to create a DLL file containing AutoCAD menu bitmaps.
Compiled menu files:
- menuname.MNC: Compiled menu file. AutoCAD automatically creates this binary file from the MNS file, whenever the MNC doesn't exist or is older than the MNS file. When AutoCAD needs to display a menu (including a toolbar), it reads the menu structure, labels, and macros from the binary MNC file, probably because it's faster than reading this stuff from the ASCII MNS file.
- menuname.MNR: Compiled toolbar bitmaps. AutoCAD automatically creates this binary file from the BMP and/or DLL files that contain toolbar bitmaps referenced by the menu's toolbars. When AutoCAD needs to display a toolbar, it reads the bitmaps from the MNR file. If AutoCAD can't find the required bitmaps, then it uses the infamous smiley face instead. (It seems to me that AutoCAD should display a frowning face, but I suppose it's another example of the triumph of marketing cheer over reality: "hey, it didn't work, but be happy!")
Menu AutoLISP file:
- menuname.MNL: When AutoCAD loads a menu (i.e., the compiled MNC file), it looks for an MNL (MeNu Lisp) file of the same name and, if it finds one, loads it. MNL files can contain exactly the same kinds of AutoLISP expressions as LSP files. You typically use an MNL file to automate the loading of pull-down partial menu pages and of LSP files that contain additional functions required by your menu macros.
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.