blog

Be More Efficient with Command Aliases

Commands are a central part of the AutoCAD program; they are used to complete a specific task and most are accessible from the AutoCAD user interface. While the AutoCAD user interface can make locating and starting a specific command easy, most power users try to avoid starting a command from the user interface because it requires moving the cursor from the drawing area. Though the user interface might make starting a command easier, it isn’t necessarily the most efficient way to start a command.

Similar to commands, the Command prompt is a central part of the AutoCAD program. The Command prompt is often used to provide values to a command started from the user interface, but it can also be used to start commands directly without the user interface. Most command names are too long to make typing in commands at the Command prompt an efficient alternative to the user interface. However, the AutoCAD program supports a feature known as command aliases.

An AutoCAD command alias is a shortened name or abbreviation of a command name, rather than a command name of 5 or more characters a command alias can be defined with as little as one character. Command aliases are a feature that many power users use to become more efficient; typing a single or few characters at the Command prompt is often faster than moving the cursor from the drawing area to the user interface and back.

AutoCAD command aliases are stored in a Program Parameters (PGP) file named acad.pgp (AutoCAD) or acadlt.pgp (AutoCAD LT). You can edit the command aliases in a PGP file using a plain text editor, such as Notepad on Windows or TextEdit on Mac OS X.

INTERESTING:   Celebrating AutoCAD: It’s Been a Great Month - AutoCAD Blog

Tip: Since a PGP file is an ASCII text file and can be opened with Notepad or TextEdit, you can print off a list of all available command aliases for you to learn and use.

Two separate pieces of information are required when defining a command alias; an abbreviation or text to be entered, and an AutoCAD command name. Each command alias defined must use the following syntax:
abbreviation, *command

The following are examples of common command aliases:
C, *CIRCLE
E, *ERASE
L, *LINE
P, *PAN
Z, *ZOOM

When defining new aliases, it is recommended to place all new aliases at the bottom of the PGP file to make it easier to identify which aliases need to be migrated after upgrading to a new release. If you add an alias that has the same abbreviation as another alias in the PGP file, the last instance of an alias is the one kept in memory and becomes accessible from the Command prompt in the AutoCAD program.

Command aliases can only be used to start a command and not start a command with a specific sequence of options or provide values to a command. A command can be executed with a specific set of options and values by writing a script, recording an action macro, or defining a custom AutoLISP function. You can find out more about scripts, action macros, and AutoLISP from the AutoCAD Help system.

These steps explain how to define an alias to start the REVCLOUD command and override the P alias to start the PLINE command instead of PAN.

  1. In AutoCAD, on the ribbon, click Manage tab > Customization panel > Edit Aliases drop-down menu > Edit Aliases.
    BecomingMoreEfficientWithCommandAliases
  2. In Notepad, scroll to the bottom of the file and click in the blank line under the ‘User Defined Command Aliases’ section.
  3. Type the following text:
    RV, *REVCLOUD
    P, *PLINE
  4. The PGP file should now look similar to the following:
    ; than once in this file, items in the User Defined Command Alias take
    ; precedence over duplicates that appear earlier in the file.
    ; **********———-********** ; No xlate ; DO NOT REMOVE
    RV, *REVCLOUD
    P, *PLINE
  5. In Notepad, on the menu bar, click File menu > Save.
  6. Switch back to the AutoCAD program.
  7. In AutoCAD, at the Command prompt, type reinit and press Enter.
  8. In the Re-initialization dialog box, click PGP File and click OK.
  9. At the Command prompt, type rv and press Enter.
    The REVCLOUD command should start.
  10. Specify two points or press ESC to complete the REVCLOUD command.
  11. Type p to test that the command alias starts the PLINE command instead of the PAN command.
  12. Specify points for the polyline or press ESC to complete the PLINE command.
INTERESTING:   AutoCAD 2017 Hotfixes | software update | Autodesk

Tip: You can use the Alias Editor (ALIASEDIT command) that is part of the Express Tools to define and modify command aliases in the acad.pgp file.

For more information on command aliases, search on “command aliases” in the AutoCAD Online Help system.

Source: Autodesk

Back to top button

Adblock Detected

Please disable your ad blocker to be able to view the page content. For an independent site with free content, it's literally a matter of life and death to have ads. Thank you for your understanding! Thanks