- slide 1 of 2
You of course may be very efficient but you might have observed that you are actually using some fixed sets of repetitive commands during your job. Using customized menu will not only increase your operational efficiency but also could increase your accuracy. Though it is possible to customize the toolbox, buttons, icons and anything else, we will limit our discussion with customization of the pull down menu.
If you sometimes feel that your AutoCAD menu bar is over crowded with the number of menus or you want your menus to appear in a different order, then your task is very simple. Just go to tools>customize menus, you will see the menu customization dialogue box is opened, go to the menu bar. The lists of menus are displayed there; you can include, remove or change the order of the menu items from there.
Basics of AutoCAD Customize Menu
When you want to bo beyond just beyond the changing order of the menu or adding/removing some options, you have to create a new menu.
There are several types of menu file used by AutoCAD with the following extensions:
Please don’t get scared with the list, we are not going to discuss all of them. We are just discussing .mns and .mnl as of now. .mns is the source menu file, autocad by default uses acad.mns for its default menu. You may see the acad.mns at \program files\autocad\support or wherever you have installed AutoCAD in your machine. Open the file using notepad. You will be able to see the different sections of the file like below:
***MENUGROUP: you will define the name of your customize menu group, in acad.mns file it is ACAD.
***BUTTONSn: It controls the menus of your mouse.
***AUXn: It controls the menus of the system pointing device.
***POPn: This is what we are most interested in. This will control the appearance of your pull down menus. If you want to add some more pull down menus, then you have to create additional POP sections or else you can add some more options of one of the existing section, by adding additional codes.
***TOOLBARS: This section controls the appearance of toolbars
***IMAGE: This section controls the image tile menu area.
***SCREEN: This section controls screen menu area.
***TABLETn: This section controls tablet menu area.
***HELPSTRINGS: This section controls the help string that will be displayed when a cursor runs over any toolbar or highlights any menu.
***ACCELERATORS: This section controls the accelerator keys.
Our discussion will be centralized around the ***POPn section of .mns file for customizing pull down menus.
- slide 2 of 2
Creating a Custom Menu Example
We will discuss here how to create a menu named “HI" and the sublevel of the “HI" “conCir", which will create two concentric circles of specified diameter.
We will place only the new menu “HI" in the whole drawing window, i.e, there won’t be any other icon and menus available when you will load this new menu file, though it may look like deviating from actual case but for the sake of understanding we will create such a special type of menu. Now go as below:
- Create a new text file named newmenu.mns and save it to c:\program files\autocad\support (if you have installed your autocad in d drive then the path will change accordingly). Write the following codes to that file:
ID_CONC[conCir](setq a (getpoint "locate center:"));\+
(setq b (getdist "enter the radius of smaller circle:"));\+
(setq c (getdist "enter radius of larger circle:"));\+
(command "circle" a b);+
(command "circle" a c);
- Issue the command menu in autocad command section, the select menu file window will appear and from there you have to select the file newmenu.mns and click open.
- You will see the menu HI appears at the top left corner of the autocad window, click on it you will find concir at the down level of it, click on it and provide the required inputs and you will get two concentric circles.
How the Example Code Works
First line of the code talks about the name of the new menu group, we have given a name ONS.
Second line tells that the new menu “HI" is a pull down menu and it is the first pull down menu (as we mentioned it as ***POP1).
Third line talks about the name of the pull down menu.
From the fourth line to the end of the codes are the actual codes for creating the concentric circles. Please notice that this is very much similar to autocodes lisp with some additions.
Meaning of some important symbols of the codes
\ Means pauses for user input.
+Indicates macros continue to the next line.