Type L and press Enter and you get the line command. Everyone knows that. What fewer people know is that command aliases in AutoCAD are not inside the program at all. They sit in a plain text file you can edit in Notepad, and the edit takes effect without a restart.
This article opens that file on AutoCAD 2027 at the Institute, counts the lines, and then measures three things we have not seen measured anywhere. For the full set of drafting shortcuts, see the AutoCAD for Construction course.
The acad.pgp file, where the command aliases in AutoCAD live
We asked the program where the file is, then opened it and counted.
| Measurement | Result |
|---|---|
| Location | %APPDATA%\Autodesk\AutoCAD 2027\R26.0\enu\support\acad.pgp |
| Total lines in the file | 558 |
| Lines declaring an alias | 419 |
| Comment lines | 100 |
| External program commands | 9 |
Four hundred and nineteen command aliases in AutoCAD ship with the release. That number explains why almost any sensible abbreviation you try already works: most of them were declared for you.
The last row is the part almost nobody notices. The same file also declares nine commands that call an external program, NOTEPAD and EXPLORER among them. Their declarations, copied verbatim from the file:
EXPLORER, START EXPLORER, 1,,
NOTEPAD, START NOTEPAD, 1,*File to edit: ,
We typed NOTEPAD at the AutoCAD prompt. It did not report an unknown command; it asked the exact question declared in the file, File to edit:. The second column is the operating system command that will run, and the part after the asterisk is the prompt.
Paste the path from the first row into a File Explorer address bar and you land in the folder. It lives inside the user profile, so every user on the machine has their own copy, and reinstalling AutoCAD does not remove it.
Alias syntax: abbreviation, comma, asterisk
Autodesk puts it briefly on the About Creating Command Aliases page: "A command alias is an abbreviation of a command name, which you can enter at the Command prompt instead of entering the entire command name."
One declaration per line, and the asterisk before the command name is required. These are real lines from the file, read by machine rather than from memory.
L, *LINE
C, *CIRCLE
E, *ERASE
CO, *COPY
M, *MOVE
TR, *TRIM
EX, *EXTEND
X, *EXPLODE
H, *HATCH
XR, *XREF
LA, *LAYER
-LA, *-LAYER
The last two lines are the pair worth learning. A hyphen in front of the command name calls the command line version, the one that opens no dialog. Type LA and the layer palette appears; type -LA and the command runs at the prompt instead. One command, two ways in.
A line beginning with a semicolon is a comment and is ignored, which is how you annotate your own aliases so they still make sense months later.
Add a command alias and make it take effect at once
This is where every tutorial stops at "run REINIT and tick the PGP File box". There is a tidier way, and we measured it properly.
We appended one line declaring the alias QQZ pointing at the circle command, then set the RE-INIT system variable to 16.
| Step | What typing QQZ does |
|---|---|
After adding the line and setting RE-INIT = 16 | starts CIRCLE straight away |
| After restoring the original file and reloading | Unknown command "QQZ". |
The second row is the control, and it matters as much as the first: without it there is no proof that the new alias came from the line we added.
So the procedure is three steps. Open acad.pgp in Notepad, add one line in the syntax above, then type RE-INIT and enter 16. No closing the drawing, no restart.
Change a command alias that already exists
The real question is not how to add a new abbreviation. It is whether an abbreviation already taken can be overridden.
It can, completely. We appended L, *CIRCLE, reloaded, and typed L: the circle command started. Restoring the original file put L back to the line command, which is the control the claim needs.
So there is no need to hunt down and delete the original line. Adding a line at the end of the file is enough, for the reason in the next section.
Incidentally, case does not matter. We typed qqz in lower case and the command still ran.
When two lines collide, which one wins
The shipped 2027 file already contains two abbreviations declared twice, which we found by machine while scanning all 419 lines.
| Abbreviation | First declaration | Second declaration |
|---|---|---|
CP | COPY | COPY |
DDUCS | UCS | UCSMAN |
The second row is a genuine collision: one abbreviation pointing at two different commands. So which one does the program listen to?
We measured it by reconstructing the situation ourselves, in both directions to be sure.
| Order of the two lines | Which command starts |
|---|---|
CIRCLE above, LINE below | LINE |
LINE above, CIRCLE below | CIRCLE |
One sentence covers it: the lower line wins. That is exactly why adding your own aliases at the end of the file is the safe habit, even when the abbreviation is already taken.
For DDUCS, the rule says the lower line's command is the one that runs. We did not type it to check, because that command opens a dialog and a dialog blocks automated measurement, so we report the rule we measured rather than a conclusion we did not.
Exactly five single letter alias slots are still free
Of all the command aliases in AutoCAD, the short ones carry the most weight, so it is worth knowing which are gone.
A single letter alias is the most valuable kind, because one key and Enter is the whole operation. We scanned all 419 lines to see which letters the 2027 release has used up.
| Measurement | Result |
|---|---|
| Aliases that are a single character | 21 |
| Letters already taken | A B C D E F G H I J L M O P R S T V W X Z |
| Letters still free | K N Q U Y |
Those five letters are five slots you can claim without overriding anyone. Our habit at the Institute is to save them for the commands we call most often whose names are longest — Q for a quick dimension routine, say, or K for a LISP command of our own.
There are also 37 aliases pointing at command line versions, the ones whose names begin with a hyphen. That count is useful when you need a command that opens no dialog so it can go into a script.
Carrying your aliases to another machine
This is the part no tutorial we read mentions, even though it is the thing people most often need to do.
Because the whole configuration is one text file, moving it is just copying a file. Three steps.
Copy acad.pgp from the old machine, out of the folder in the first table.
Overwrite the file of the same name on the new machine, after renaming that machine's existing copy so you keep a way back.
Type RE-INIT and enter 16 on the new machine, or simply restart AutoCAD.
A better habit still is keeping a separate note file holding only the lines you added, each with a semicolon comment. When you move to a newer AutoCAD release you paste that block at the end of the new file instead of overwriting the whole thing, so you keep whatever aliases the new release introduced.
Organising a set made of many files is covered in our article on external references.
Using a dialog instead of editing the file
If opening Notepad does not appeal, there is another route. The Express Tools set has a panel for adding and editing abbreviations, under the Express menu, Tools.
Both routes write to the same acad.pgp, so either is fine. The difference is only in working habit.
| Editing the file directly | The Express Tools panel | |
|---|---|---|
| See all 419 lines at once | yes | no |
| Search with Ctrl+F | yes | no |
| Edit in bulk, paste a whole block | yes | no |
| Impossible to get the syntax wrong | no | yes |
For a newcomer the panel is safer, because you cannot leave out the asterisk. For anyone already used to it, editing the file is far quicker, especially when rebuilding a whole set of abbreviations on a new machine.
One command often confused with this is the screen refresh, which has nothing to do with this file. It is covered in our article on the RE command.
Three things often repeated that are not true
| Often repeated | What we measured on the 2027 release |
|---|---|
| You must restart AutoCAD after editing | Setting RE-INIT to 16 makes the new alias work immediately |
| A built-in abbreviation cannot be overridden | We appended L, *CIRCLE and L started the circle command |
| A duplicate abbreviation raises an error | Nothing is reported; the lower line wins |
Frequently asked questions
Where is the acad.pgp file?
Inside the user profile, at %APPDATA%\Autodesk\AutoCAD 2027\R26.0\enu\support\acad.pgp. Paste that string into a File Explorer address bar.
What is the syntax of one line?
The abbreviation, a comma, then an asterisk and the command name, for example L, *LINE. The asterisk is required. A line starting with a semicolon is a comment.
How do I make an edit take effect immediately?
Type RE-INIT and enter 16. We measured it and the new alias was usable at once, with no need to close the drawing.
What happens if I reuse an abbreviation that already exists?
Nothing is reported and the lower line wins, which is why your own lines belong at the end of the file.
How many aliases ship with the 2027 release?
We counted by machine on the original file and found 419 declaration lines, out of 558 lines in total.