![]() |
![]() |
||||||||||||||||||||||||||||||
| AutoCAD Tips to Work Smarter - November 2003 |
|||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
Customizing the Edit Right-Click MenuAutoCAD 2000 introduced several context-sensitive right-click menus. These menus display different commands and options based on the location of your cursor and the active command when the right-click is executed. Two of the right-click menus you have probably used are the CmDefault and CmEdit menus.
CmDefault You should already be familiar with creating pull down menu before attempting to create an Image menu. Click HERE to learn about pull down menus. You should also be familiar with the AutoCAD File Search Path and installing custom menus. Click HERE to read more about locating custom files. You can customize these menus by editing the Acad.mnu or Acad.mns file. Note: The Acad.mns file stores all of the toolbar customizations you have made. I recommend that you make a copy of your current Acad.mns file in another folder before making changes. The Acad.mnu and Acad.mns files are typically installed in the Support folder for AutoCAD. Another option is to copy the Support files to a different folder and change the AutoCAD Support File Search Path To look for support files, like the Acad.mns file, in this location. This approach has the advantage of keep the original support files totally intact. For more information on this approach go to Profiles and Installing Menus.
You can customize the Acad.mns file using a text editor, like the Visual LISP Editor in AutoCAD. The Visual Lisp Editor can be started by selecting the menu path Tools > AutoLISP > Visual LISP Editor. Open the Acad.mns file. Use the Find function to locate **CMDEFAULT in the file or scroll down until you locate the menu section below. This is the CmDefault section.
***POP502
Diesel ExpressionsIn addition to basic menu codes, Diesel (Direct Interpretively Evaluated String Expression Language) expressions can be included in menus. Each Diesel expression begins $M= followed by the Diesel expression. Arguments or options to the Diesel expressions are separated by commas. $M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_move,^C^C_move) Here is a summary of the Diesel expression above. If the first four characters of the active command is GRIP, then enter the grip edit option MOVE, otherwise execute two ESC's and begin the MOVE command.
$(getvar,cmdnames) - retrieve the system variable cmdnames (active command name). I think it would be useful to include the Mirror and Array command in the CmEdit menu. Mirror is one of the Grip edit modes, so I copied the menu line for scale and made the appropriate changes. The Array command is not included in the Grip edit modes, so I copied the menu line for Erase and made the changes.
***POP502
When you are finished making the changes, save the file and exit AutoCAD. Restart AutoCAD and the try out your new CmEdit menu. Note: If you load your Acad,mns using the Menu command you will uninstall any partial menus your may have loaded. | |||||||||||||||||||||||||||||||