NECHES ENGINEERS
  • HOME
  • ABOUT US
  • Services
  • CAREERS
  • Contact

Create a New Command

12/11/2015

0 Comments

 
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 (Create a New Command).
  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:

< 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.

I really like using AutoCAD's LENGTHEN command. And when I use it, I *only* use it Dynamically, so I've created a new macro into a new button that I can use that will automatically start the Lengthen command and step through the selection of Dynamic and let me pick that line that I want to work on.

​
Picture
First, type CUI to bring up the Customize User Interface, and then select the CREATE A NEW COMMAND button as shown above. A new command will be created called COMMAND1 (or COMMAND2, or COMMAND3...)
Select the COMMAND1 command from the Command List pane, just below you Create A New Command button.
This will populate the PROPERTIES area for the command.
Picture
Under PROPERTIES I called my new Command LDY and wrote a brief description.
At the MACRO area it reads: ^C^C_lengthen;dy;
[which basically tells AutoCAD Cancel Cancel. Start the LENGTHEN command <enter> DYnamic <enter>
I also stole the default lengthen button image.
Picture
Lastly, I added my new command to a newly created Toolbar Menu. You can add your new command to any Toolbar menu.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    AutoCAD Tips provided each Wednesday.

    Archives

    March 2016
    February 2016
    January 2016
    December 2015
    November 2015

    RSS Feed

    View my profile on LinkedIn

SERVICES

Engineering
Project Management
Consulting
Windstorm Inspections

ADDRESS

5555 College St. Ste. #106
​Beaumont, TX 77707

CONTACT

P: 409 860-7168
​F: 409 860-7169
​​Email:
info@nechesengineers.com
© COPYRIGHT 2017. ALL RIGHTS RESERVED.
  • HOME
  • ABOUT US
  • Services
  • CAREERS
  • Contact