The menu template or rather MNU file is the building block for a
menu. Such files can be defined with a text editor. Here you
will learn how to build a simple menu template. Some later
tutorials will help you to make the template more complex.
If you are not familiar with menu files read the following
► AutoCAD Menus: The Base Menu
► AutoCAD Menus: Partial
This tutorial is designed for AutoCAD 2004 though might be
applicable for other releases.
1. Start Notepad.
2. In Notepad
window enter the proper code [Figure 1].
- The lines that start with // are considered as comment
lines. Comments are ignored by compiler.
- ***MENUGROUP=SAMPLE indicates the name of the menu group.
There should be no space between characters of this line. You
may replace SAMPLE with another name.
- ***POP1 defines a pull-down menu. POP1 through POP499 are
reserved for pull-down menus.
- **Main is the alias for POP1.
- [Main] indicates the name that will appear as the menu
name on menu bar.
- ^C^C cancels any running command. The _ is used to make
the menu option multilingual.
- Semicolon and blank space are interpreted as pressing
3. Save the file as
4. Start AutoCAD.
5. Invoke MENULOAD
(Tools > Customize > Menus). The Menu Customization dialog box
appears [Figure 2].
6. Click Browse.
7. Locate and open
"sample.mnu" [Figure 3].
Figure 3 - Click on image to
8. Click Load. A
warning message appears [Figure 4].
9. Click Yes.
10. From the list
of loaded menus select Sample.
11. Click Menu Bar
12. Add the Main
menu to the menu bar [Figure 5].
13. Close the
dialog box. The new menu is added to the menu bar [Figure 6].
14. In Notepad
window make some modifications to the file [Figure 7].
- Add & before a character to make it the menu option access
key. For example if you press Alt key the letter "a" in Main
menu will be underlined. Press "a" to access this menu.
- The names that are added before the menu options are
called name tags. The name tags build a reference to Status
bar help messages. Such messages are defined in ***HELPSTRINGS
section. When you highlight an option in a menu, AutoCAD will
show the relevant message on Status bar if there is a matching
15. Save the file.
16. In AutoCAD
invoke MENULOAD (Main > Partial Menus).
17. Unload the
SAMPLE menu group.
18. Browse and Load
19. Add Main to the
20. Press Alt key
and use keyboard to access your menu options.
21. Highlight any
of the options with mouse pointer. A help message appears on
to download the readymade menu template.
To be continued.
Alireza Parsai is the founder of cadpanel.com. He is a
mechanical engineer with more than 12 years experience with
AutoCAD. Alireza is an Autodesk Authorized Author, the AutoCAD
consultant for Al Khawarizmi Institute, a contributing editor
for Augiworld magazine, a writer for CAD Digest, an instructor
for AUGI Training Program, and an elected speaker for Autodesk
University 2002. He has written 7 books in Farsi, 3 booklets in
English, and more than 30 articles for different magazines and
newsletters. You can reach him at
email@example.com or visit his website