Becoming a Keyboard Warrior – The Command Alias Editor

by Donnie Gladfelter on May 5, 2009

in AutoCAD

image As much as I love the enhancements to the ribbon inside AutoCAD 2010, I have a slight confession to make. I hardly click buttons, navigate menus, or even browse the ribbon to launch many of my most used commands. Instead I revert to a simpler time before such user interface enhancements – the keyboard. Call it archaic, but with minimal effort, you too can become an AutoCAD keyboard warrior! How you ask? To find the answer you need to look no further than the beloved Express Tools.

Looking to the old Express menu, the lesser known Command Alias Editor is tucked away under Express > Tools > Command Alias Editor. Users of AutoCAD 2010 do not have to look far at all as the Command Alias Editor is the biggest button on the Tools ribbon panel on the Express Tools ribbon tab. As you may have guessed, the Command Alias Editor is the secret to configuring your keyboard like an AutoCAD pro!

AutoCAD veterans are probably familiar with modifying the acad.pgp file.  For the uninitiated, the acad.pgp is really just a text file containing all of the command aliases used within AutoCAD.  For instance, there’s no L command inside AutoCAD, but you’ve probably used it to draw a line at one point or another. The entering L at the command line lets you draw a line is because the alias L is mapped to the LINE command. While AutoCAD ships with L mapped to the LINE command, with the help of the acad.pgp file you’re free to change it to anything you want.

Making things even easier (by putting a graphical interface on the acad.pgp file) is the Command Alias Editor Express Tool. With just a few clicks you can add, remove, or edit any of your command aliases.

To Edit an existing alias

Let’s say you want to remap the LA alias (LAYER command by default) to CLASSICLAYER.

  1. Launch the Command Alias Editor from the Tools panel within the Express Tools ribbon tab.
    image
  2. Find the LA alias from the Command Alias Editor, and click the [Edit] button
    image
  3. From the Edit Command Alias dialog, enter CLASSICLAYER into the AutoCAD Command textbox, and press [Ok]
    image
  4. The following warning will display. Press [Yes] if you’re ok with the edit you just made.
    image
  5. The following dialog will display to confirm the change.
    image

Add a new Alias

Let’s say you want to create an alias LLI to launch the LAYISO command.

  1. Click the [Add] button to create a new alias.
  2. From the New Command Alias dialog, enter LLI as your alias, and LAYISO as your AutoCAD command (see illustration)
    image
  3. After pressing [Ok], you will see the command listed inside the Command Alias Editor.
    image

Save Command Aliases

Once you have made the desired changes within the Command Alias Editor…

  1. Click the [Ok] button
    image
  2. You will be asked to confirm overwriting your current acad.pgp file.
    image
  3. A confirmation, letting you know the aliases you just modified have been saved, and made available to your current AutoCAD session.
    image

And that’s it! With a little imagination you can quickly conjure up all sorts of two and three character shortcuts to your most common commands.

  • bigD

    HST and Donnie, I’m working in 2007, and I have a similar problem. I’m not able to change any of my aliases… in fact no one in my office is. quite frustrating, really. I read HST’s comment about unloading the lisp… how would one go about doing this. And also, Donnie, how do I know if my .pgp file is in the right spot? I looked in this folder and i am sorry to say that I have no clue what i’m looking at.
    any help would be greatly appreciated.

    • http://www.thecadgeek.com Donnie Gladfelter

      bigD – Not knowing how your CAD Manager has set up your CAD environment, it’s rather difficult to pinpoint what’s going on here. As for the LISP thing, I’d recommend looking in the startup suite (APPLOAD command), and/or look at the LISP node within the CUI command. There’s a number of ways to load LISP, hence the reason so much hinges on how things were setup in the first place.

      If you’re having a hard time locating your acad.pgp file. use the Command Alias Editor mentioned in this post, and go to File > Open. Look at the location that defaults to. On Win XP things should look something like this” C:\Documents and Settings\YOUR USERNAME\Application Data\Autodesk\AUTOCAD VERSION\enu\Support” (note the variable for both the username and product name).

  • bigD

    HST and Donnie, I’m working in 2007, and I have a similar problem. I’m not able to change any of my aliases… in fact no one in my office is. quite frustrating, really. I read HST’s comment about unloading the lisp… how would one go about doing this. And also, Donnie, how do I know if my .pgp file is in the right spot? I looked in this folder and i am sorry to say that I have no clue what i’m looking at.
    any help would be greatly appreciated.

    • http://thecadgeek.com/ Donnie Gladfelter

      bigD – Not knowing how your CAD Manager has set up your CAD environment, it’s rather difficult to pinpoint what’s going on here. As for the LISP thing, I’d recommend looking in the startup suite (APPLOAD command), and/or look at the LISP node within the CUI command. There’s a number of ways to load LISP, hence the reason so much hinges on how things were setup in the first place.

      If you’re having a hard time locating your acad.pgp file. use the Command Alias Editor mentioned in this post, and go to File > Open. Look at the location that defaults to. On Win XP things should look something like this” C:Documents and SettingsYOUR USERNAMEApplication DataAutodeskAUTOCAD VERSIONenuSupport” (note the variable for both the username and product name).

  • HST

    I just upgraded to 2010 and none of my aliases are working. The .pgp file is there, and shows them as being what I want, but they don't actually work. Any ideas on how to fix this?

    • http://intensedebate.com/people/dgladfelter Donnie Gladfelter

      @HST – The first thing I would check is to see if the acad.pgp file is located in the correct location. Keep in mind for the last several releases AutoCAD uses the local user directory for the acad.pgp file. In 2010 the path should look like this (C:\\Documents and Settings\\USERNAME\\Application Data\\Autodesk\\PRODUCT NAME\\enu\\Support)

      • HST

        Hi, thank you for your response. I actually figured out the problem (after going through EVERYTHING). The .pgp file was in the correct place, with all the correct aliases. What was happening was when our new AutoCAD was loaded, all the existing lisp files our office had were also loaded even though I didn't use all of them. One of the lisp files was for shortcut commands (which were different) and it was overwriting my alias commands. So once I unloaded the lisp, everything worked perfectly! Hopefully if anyone else comes across this problem my solution will help!

  • HST

    I just upgraded to 2010 and none of my aliases are working. The .pgp file is there, and shows them as being what I want, but they don't actually work. Any ideas on how to fix this?

    • http://thecadgeek.com/ Donnie Gladfelter

      @HST – The first thing I would check is to see if the acad.pgp file is located in the correct location. Keep in mind for the last several releases AutoCAD uses the local user directory for the acad.pgp file. In 2010 the path should look like this (C:\Documents and Settings\USERNAME\Application Data\Autodesk\PRODUCT NAME\enu\Support)

      • HST

        Hi, thank you for your response. I actually figured out the problem (after going through EVERYTHING). The .pgp file was in the correct place, with all the correct aliases. What was happening was when our new AutoCAD was loaded, all the existing lisp files our office had were also loaded even though I didn't use all of them. One of the lisp files was for shortcut commands (which were different) and it was overwriting my alias commands. So once I unloaded the lisp, everything worked perfectly! Hopefully if anyone else comes across this problem my solution will help!

  • Pingback: Becoming a Keyboard Warrior – Getting Ctrl of CAD | All About CAD

  • Carlos Padilla

    How do you change the .pgp file inside Autocad LT? There is no Express Tools in LT.

    • http://www.thecadgeek.com Donnie Gladfelter

      @Carlos – You will have to modify it manually using notepad (or something similar). The location will vary based on which OS you are using. Vista/Win 7 will be something like C:\Users\USERNAME\AppData\Roaming\Autodesk\PRODUCT NAME\enu\support\acad.pgp. In XP it will be something like C:\Documents and Settings\USERNAME\Application Data\AutoDesk\PRODUCT NAME\VERSION\ENU\Support\.

      If you can’t find it using those paths, do a search for acad.pgp on your C drive.

  • Carlos Padilla

    How do you change the .pgp file inside Autocad LT? There is no Express Tools in LT.

    • http://thecadgeek.com/ Donnie Gladfelter

      @Carlos – You will have to modify it manually using notepad (or something similar). The location will vary based on which OS you are using. Vista/Win 7 will be something like C:UsersUSERNAMEAppDataRoamingAutodeskPRODUCT NAMEenusupportacad.pgp. In XP it will be something like C:Documents and SettingsUSERNAMEApplication DataAutoDeskPRODUCT NAMEVERSIONENUSupport.

      If you can’t find it using those paths, do a search for acad.pgp on your C drive.

  • Pingback: Becoming a Keyboard Warrior – Getting Ctrl of CAD | The CAD Geek Blog

  • Serge L.

    Continuing the off-topic. Actually I found a weird way to solve this problem. I filter out all non-mleaders, block them and then explode. This severs the associations.

  • Serge L.

    Continuing the off-topic. Actually I found a weird way to solve this problem. I filter out all non-mleaders, block them and then explode. This severs the associations.

Previous post:

Next post: