Where’s my pgp?

Last week I mentioned the pgp file, but I forgot to explain what it does.  PGP is what is known as a program parameters file.  AutoCAD reads the first acad.pgp file it finds in its search paths, and uses that to make commands available as keyboard shortcuts.

Search Paths

SNAGHTMLd24f6b

You can open the pgp file that is loaded by using the Ribbon:

image

Here’s a link to a good article that covers more detail.

http://newsletters.hagerman.com/newsletters/ebul57-CT.htm

I thought I’d share another coding shortcut though.  You can use the following command (pgp) to open the loaded pgp file and edit it.  Of course, having a shortcut was more useful before the ribbon since you had to navigate through 3 levels of menus to open the pgp file.

;loads users pgp file
(defun c:pgp ()
(command "SHELL" "acad.pgp")
(princ))

Anyhow, another freebie.  Enjoy!