Jump to content

LISP (or other) to load custom .pgp files (acad.pgp)


walton10

Recommended Posts

AutoCAD 2008

 

Hi, I am wondering if anyone knows a way to save and load (open) a .pgp file without manually navigating through the ALIAS EDITOR dialogue box. I am looking to write a LISP function that has two commands. The first command (c:loadWalton10) stores the current settings to a location on the Company Server (such as ...\TEMP.pgp) and then loads my setup from a file also stored on the server (such as ...\walton10.pgp). The second command (c:unloadWalton10) would restore the original settings (from ...\TEMP.pgp).

 

I would probably add other loads to these commands as I figure them out, which is why I am looking for a LISP program to do it, since I am somewhat familiar with LISP and not at all with VBA; however, whatever language would work I would be interested to see. We use various versions of ACAD at our office, but most are 2008 or more recent.

 

Thanks very much for your help.

 

AutoCAD 2008

Link to comment
Share on other sites

The REINIT command will allow to re-load the PGP file - not sure if can be called on command line mode (avoid dialog box / user interaction).

 

Regards,

Link to comment
Share on other sites

(setvar "RE-INIT" VALUE)

 

Reinitializes the digitizer, digitizer port, and acad.pgp file. The setting is stored as a bitcode using the sum of the following values:

 

1 Digitizer input/output port reinitialization

4 Digitizer reinitialization

16 PGP file reinitialization (reload)

 

To specify more than one reinitialization, enter the sum of the bitcode values. For example, enter 5 to specify both digitizer port (1) and digitizer reinitialization (4).

 

eg.

(setvar "RE-INIT" 16)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...