home - about - advertise     

AutoCAD Tutorial

AutoCAD Menus: Building a Menu Template, Part 2

July 14, 2003

In Part 1 of this tutorial you created a simple menu file with status line help messages and access keys. The following tutorial shows you how to make a more complex menu template by adding separator lines and cascading menus. You will also add shortcut keys and accept user entry.

If you are not familiar with menu files read the following tutorials first:

AutoCAD Menus: The Base Menu
AutoCAD Menus: Partial Menus
Building a Menu Template, Part 1

Note: This tutorial is designed for AutoCAD 2004 though might be applicable for other releases.

1. Download sample.mnu.

2. Open the file in Notepad.

3. Make proper modifications [Figure 1].

Figure 1


  • Backslash (\) refers to user entry.
  • [--] creates a separator line on menu.
  • SingleLN is a name tag. You could replace it with any other name. This name is used as a reference between the menu item and the status line help string.

4. Save the file.

5. Start AutoCAD.

6. Invoke MENULOAD (Tools > Customize > Menus).

7. In Menu Customization dialog box click Menu Groups tab [Figure 2].

Figure 2

8. If you have already loaded the SAMPLE menu group, select it from the list and then click Unload.

9. Click Browse. Locate and open "sample.mnu".

10. Click Load. A warning message appears.

11. Click Yes to load the menu group.

12. From the list click SAMPLE and then click Menu Bar tab.

13. Insert the Main menu before Help.

14. Close the dialog box. Open the main menu [Figure 3]. A separator line is inserted between Single Line and Erase All options.

Figure 3

15. Click Single Line. The option will draw a single line segment.

16. Open Notepad.

17. Make some modifications [Figure 4].

Figure 4

Note: The -> shows the beginning of a cascading menu and <- indicates the end of it.

18. Save the file and reload the menu with the method of steps 8 to 13. A cascading menu is added to the Main menu [Figure 5].

Figure 5

19. Let's add a shortcut key. Open Notepad and add ***ACCELERATORS section to define a shortcut key for Single Line [Figure 6].

Figure 6


  • The name tag is used to link the key with menu option.
  • CONTROL stands for pressing Ctrl key. Therefore you should press Ctrl+Alt+S to invoke Single Line.

20. Reload the menu. Press Ctrl+Alt+S to invoke the menu command.

To be continued.

About the Author

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 alireza.parsai@cadpanel.com or visit his website www.cadpanel.com

More CAD Corner tutorials >>

CADdigest Weekly
Email (required) *

A week's worth of articles will be emailed to you. See latest issue .