Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

2 letter quick commands

bnickas041774
Community Visitor

2 letter quick commands

bnickas041774
Community Visitor
Community Visitor

How do you change the .pgp or command alias prompts to my own custom ones I like? For example EX is extend, and I want that Explode, and X for Extend. 

 

Thanks for any help

0 Likes
Reply
1,270 Views
5 Replies
Replies (5)

Patchy
Mentor
Mentor
0 Likes

rkmcswain
Mentor
Mentor

Another way is to create small lisp functions, the advantage of this being that you can add options to your short commands, such as ZOOM WINDOW (with the PGP file, you can only do ZOOM)

 

  • Create a file in Notepad
  • Save it as "acaddoc.lsp" (put quotes around the file name when you save so it doesn't add "txt" on the end)
  • For each shortcut you want, add a line like this: (Red is the thing you want to type in, blue is the name of the command, and green are command options (if any). (Note: those colors will not show in Notepad, that's only so you can see the syntax.)

 

  • (defun c:ZW () (command "._zoom" "_W"))
    (defun c:X () (command "._explode"))
    (defun c:P () (command "._plot"))
    (defun c:Z8 () (command "._zoom" "_S" "0.8x"))
  • Put this file in a location that is at the TOP of your support file search path (Options>Files)
  • Even better? Create a new folder and place the file in this new folder, then ADD this folder to the top of your support file search path.

 

Cheers.

 

 

 

R.K. McSwain     | CADpanacea | on twitter
0 Likes

Jonathan3891
Advisor
Advisor
Edit Tab > Edit Aliases

Jonathan Norton
Blog | Linkedin
0 Likes

scot-65
Advisor
Advisor
ZW...
There was no default action for ZOOM in R12 - back in the day.
Or was it R10?
🙂

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


0 Likes

elshawadfy
Collaborator
Collaborator

Hi @bnickas041774,

 

As @Patchy & @Jonathan3891 said, you can use the command "AliasEdit" either by typing the command or going to the express tab > Tools Panel > Alias edit - and then edit the aliases one by one..

- To use a custom *.pgp file that you alredy have, in the same window of the "aliasedit" command got to File > Import and select your .pgp file (this is safer than overwriting the current acad.pgp manually which could cause you to lose the aliases of the new commands added in newer relaeses of autocad in case the pgp file belonged to an earlier release..)

- If you want to edit the Acd.pgp manually (Not Recommended): go to Manage tab > Customization Panel > Edit Aliases. But note that there are several points to consider, you can read about them in these articles: Artcle 1; Article 2.

 

@rkmcswain Approach was a little different, he used LISP to define new commands with shorter names that call the original ones; which also works perfectly..

 

0 Likes