ellen finkelstein logo

Ellen Finkelstein.com
AutoCAD PowerPoint About Links
       

Over 165 AutoCAD tips and tutorials!

AutoCAD Tips
AutoCAD Tips Blog

Get a free dynamic block tutorial and free AutoCAD tips!

AutoCAD 2010 course
AutoCAD training video

Buy a Book

E-mail This Page 
to a Friend

Submit a tip! If you include your name and I post your tip, I'll give you credit.

AutoCAD Tips & Tutorials

Tutorial: Create a custom command

If you find yourself using the same combination of commands and options over and over, you can easily create a custom command that executes the combination with a click of a button or a menu item. In this tutorial, I explain the basics of AutoCAD's menu syntax so that you can create your own commands. No programming required!

  1. Enter cui at the command line/dynamic tooltip to open the Customize User Interface dialog box.
  2. In the Command List pane, click New.
  3. In the Properties pane, enter a name for the command in the Name text box. Also enter a description in the Description text box.
  4. If you think your command will be long or need more than one line, click in the Macro text box and then click the Ellipsis button that appears on the right. Then enter your macro in the Long String Editor dialog box. Otherwise, enter the macro in the Macro text box. Start by writing out the combination of commands and options as you would enter them on the command line or in a script. Then add any necessary special characters.

Below are the special characters you need to know for menu macros:

Character Description
Space Equivalent to pressing Enter except when entering text to create a text object that contains spaces (between words). Use between the command and its options.
; (semi-colon) Equivalent to pressing Enter. The end of a line in a menu macro is also equivalent to pressing Enter. More helpful than using a space when you need to press Enter twice, because it shows the number of Enters more clearly. Also helpful at the end of the macro.
\ Pauses for user input, such as picking a point or entering a value.
+ At the end of a macro line, continues the macro to the next line
* At the beginning of a macro, before ^C^C, repeats the macro until you press Esc or choose another menu item.
^P Toggles the display of the menu macro on the command line; makes the macro look neater when you use it.

  1. From the Command List Categories drop-down list, choose Custom Commands to easily find your command. Select it and drag it to the desired menu or toolbar at the top of the Customize User Interface dialog box.
  2. If you drag it to a toolbar, use the Button Editor to give it an image. Usually, you choose an existing button to start with, click Edit, and modify it. Then click the Save As button to save the icon image.
  3. Click OK and try out your new command!

More Tips

101 Tips

Page copy protected against web site content infringement by Copyscape

+
Books by Ellen

AutoCAd 2010 Bible

AutoCAD 2010 & AutoCAD LT 2010 Bible
10th Edition!

Learn about the new surfaces, hatch features, and more!

 

New!
AutoCAD 2009 and AutoCAD LT 2009 Bible

This is the 9th edition of this book! Completely updated to conform to the new interface and, of course, it covers all the new features, such as the ribbon, Quick View, ShowMotion, the View Cube, the SteeringWheel, and more.

AutoCAD 2008 and AutoCAD LT 2008 Bible
Learn the great new features with wide application to all disciplines. Get the most comprehensive book on AutoCAD! DVD contains a 30-day trial of AutoCAD and AutoCAD LT. Thorough exercises guide you through each feature.

AutoCAD 2007 and AutoCAD LT 2007 Bible 
Discover the 2007 features, especially the radically improved 3D tools. CD has AutoCAD 30-day trial, 3rd-party software, and drawings for exercises.

                                  Home  |  AutoCAD  |  PowerPoint  | E-StoreAbout  | Links | Contact | Site Map
Copyright Ellen Finkelstein, Inc.