Categories

AutoCAD 2015 and AutoCAD LT 2015 BibleAutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

Tutorial: Create a command alias (keyboard shortcut)

Many people like to use the keyboard to enter commands, but some of the commands are long, hard to type, or difficult to remember. You can create keyboard shortcuts for commands, such as DL for DIMLINEAR or RVC for REVCLOUD.

AutoCAD comes with a large number of aliases already made for you. You edit the acad.pgp file to add to these, or change them.

The acad.pgp file is a text file and you can edit it directly, but the easiest way is to use the Express Tools ALIASEDIT command.

Follow these steps:

  • Choose Express > Tools > Command Alias Editor.

  • After deciding the command and alias you want, check to see if the command already has an alias. Click the AutoCAD Command column to alphabetize the list by commands. Scroll to look for the command.
  • If it doesn’t have an alias, check to see if the alias is already in use. To do so, click the Alias column to alphabetize that column. Click any alias, and type the first letter of the alias to jump to aliases starting with that letter. Look for the alias.
  • If your command isn’t listed and your alias isn’t being used, click Add.

  • Type the alias in the Alias text box and the AutoCAD command below it. All the commands are on the list, and as you start to type, the command appears on the list. You can click it as soon as you see it, or type the entire command. For example, I added rvc for REVCLOUD. Click OK.
  • If your command is on the list, but your alias isn’t, you can add the alias for the command. As before, click Add, enter the alias, and specify the command. A command can have more than one alias. I added dl for DIMLINEAR, even though there were other aliases for that command.
  • If your alias is being used, you can delete or change it. Then you can use it for a different command. For example, rc is the alias for RENDERCROP, which you might rarely use. By deleting it, you could use rc for RECTANG. To delete an alias, select it and click Remove, then click Yes to confirm.
  • You can change an existing alias. For example, you might want to change the alias for RENDERCROP to rencr, instead of deleting it. To do so, choose the alias, and click Edit. In the Edit Command Alias dialog box (which looks just like the New Command Alias dialog box), enter the new alias and click OK.

Note: You might be surprised to see some aliases on the list that are longer than their commands! Or completely different. AutoCAD uses this to map one command to another or to include command names that don’t exist, but that people might still use. For example, the RECTANG command has an alias of rectangle.

Top Customization Tips Every AutoCAD? User Should KnowTop Customization Tips Every AutoCAD User Should Know
AutoCAD is meant to be customized, but customization is one of the most complex features of AutoCAD. Gain the knowledge you need to be a master at customizing AutoCAD!

Tip: To print the alias list, choose File > Print from the AutoCAD Alias Editor’s menu.

  • When you’re done, click OK. If the Confirm Changes dialog box is checked, you get a message asking you to confirm that you want to replace the configuration file (acad.pgp). Click Yes.

  • AutoCAD doesn’t recognize the change right away, because it doesn’t re-check the acad.pgp file during a session. You could close and re-open AutoCAD, but there’s an easier way. On the command line, enter reinit.

  • Check the PGP File check box and click OK. Now your new aliases will work. Try them out!

Note: You can edit the acad.pgp file directly. It’s in the Support folder. To find that folder, choose Tools > Options and click the Files tab. Double-click the Support File Search Path item and look at the first item. This file contains a User Defined Command Aliases section at the end where you can add your own aliases; these aliases override those in the main section. Use the same format as you see in the file, which is Shortcut,*Full_command_name. Save the file and use the REINIT command as just described.

24 comments to Tutorial: Create a command alias (keyboard shortcut)

  • Pip Smith

    Hi. In the past I have assigned the number pad keys to the individula snaps. numpad1 perpendicular snap, numpad8 endpoint snap. etc. How do I do this in ACAD 2010.

  • Ellen

    How did you do it before? In which Release were you working?

  • joel

    What is the ALIASEDIT command in 2004?

  • Ellen

    In all recent releases, it opens a dialog box so you can easily edit the acad.pgp file to create command aliases.

  • ramu

    hai iam ramu. plz tel me abt auto cad commands & shortcut keys

  • Bertrand

    Just a tip to say that you can use the re-init command and specify the value 16.
    This way, you don’t get the dialog box and you can put it in a macro.

  • Larry

    Ok, so I’ve made the changes I wanted in the alias editor. I click on yes on the confirm dialog box and I get an error that states access is denied. I’m not able to overwrite the previous acad.pgp file.

  • Ellen

    I’ve never seen that. Perhaps a network access issue?

  • Taylor

    I want to create a alias for “_PREVIEW” to do a plot preview, but the command isn’t listed as an autocad command. Did I miss something?

  • Manu

    Hi, same as Taylor, but the difference is that I want to add an alias for a lisp routine. It isn´t listed in the dialog box, what should I do? Thanks!

  • Ellen

    once the AutoLISP routine is loaded, you execute it by typing its name or command on the command line. You can write it, or name the file, to be 2 or 2 letters.

  • dexcem

    please tell me the aliasedit command in 2012 version because the ALIASEDIT is not working on this version.

    thank you very much!

  • Ellen

    I don’t know why it wouldn’t work in any version, but you can try editing acad.pgp directly.

  • Greg Koets

    Hello:

    I would like to know how to create different views in model space using keyboard shortcuts. example – from a top view of an object to a sw view zooming back onto the object. At one time I saw someone use the command 3sw keyboard command and the model view went to the sw view and remained zoomed on the object. Then he would use 3t command that brought him back to the top view zoomed in. He had 3t 3sw 3se 3nw 3ne as the keyboard shortcuts.

    How can I create this? Autocad 2007

  • Ellen

    I think you wold start with a custom command and then assign a keyboard shortcut to it.
    http://www.ellenfinkelstein.com/acadblog/tutorial-create-a-custom-command/
    Those types of keyboard shortcuts are called aliases. Here’s how to create them: http://www.ellenfinkelstein.com/acadblog/tutorial-create-a-command-alias-keyboard-shortcut/
    If you get it done, please leave a comment so others can benefit.

  • How to remove an alias command ..? my old colleague used work with his alias commands but it seems not comfortable to me.. pls do reply ..

  • Ellen

    When you edit the aliases you can delete the row that contains the one you don’t want. Or you can just not use it and create your own and use that.
    This should help: http://www.ellenfinkelstein.com/acadblog/tutorial-create-a-command-alias-keyboard-shortcut/

  • mokob

    Can you edit command aliases in AutoCAD LT 2013 for Mac? If so, how? If not, can you do it for the Windows version?

  • Ellen

    Don’t know about the Mac. You can do it for the Windows version as described in this post.

  • Robert

    I have edited the pgp file before in older versions of cad. I just got upgraded to 2012 and I am having a problem. There is an existing alias of C to make a circle. I am trying to change C to be copy and CC to be circle. The CC for circle works but the C still also does circle and NOT copy. I remember having this problem before and can’t remember how I solved it.

  • Hans Graveman

    Robert

    Did you remove the old version of C for circle ?

    Hans Graveman

  • BillN

    Robert, I think there are at least two places you can have the C=Circle thing going on. One is in the pgp, which you can reassign. Two is in an *.lsp file where you can reassign things. I’m not sure which is processed first – the pgp or the lsp – but whatever is done last always wins….I think… So (I think) even if you assign the same command in one file (either pgp or an lsp), the last one overwrites the first one…I think… when it gets loaded into memory. If you typed your command at the top of the list in one of those files and C = circle was at the bottom of the file and not commented out with a semi-colon, then the bottom one wins. If pgp comes first and lsp comes second, then lsp wins. I think lsp comes first. Do you have an lsp file happening maybe? Just thoughts. I haven’t used the newer versions of Autocad, only 2005 (I know, old, huh…) Bill

  • […] If you are not familiar with modifying command alias, you can read Brian’s tutorial here. You can also use express tools as explained by Ellen Finkelstein here. […]

  • Thanks for sharing your thoughts about command. Regards

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>