Restore definition of acad.pgp

egen

Usenet Archive
Joined
Dec 24, 2003
Messages
8
Reaction score
0
Hi, i've a problem:
i've one LSP file, which has my own customized shortcut commands inside, with the content like this:
(defun c:c
(command ".copy")
)
The usage of above is to use the shortcut commands i like on other person's computer, C now stands for Copy, but the problem is when i finish my job, and let other guys continue, they don't like it , they still want use C for Circle. so, i need reload the DWG file so autocad can load command definition from acad.pgp, which is a little troublesome. So anybody can help me restore the definition of acad.pgp without reloading? i.e. cancelling the lsp definition. note: REINIT command can NOT restore the command defined by (defun).
so how? Thank U!

or .
 
On menu, place [Reset Commands]^c^c(load "reset.lsp");
In reset.lsp - for each command you altered..
(defun C:C
(command ".circle")
)
(defun C:EX
(command ".extend")
)
-------- etc.

This will reset to normal commands, without 'reloading' the .dwg. The above merely 're-writes' the functions, back to original.

Bob
 
Thank you, your point is to restore the system's default shortcut command, but What i want is: restore the definition from acad.pgp, read through the acad.pgp and apply all the definitions, like this:
in acad.pgp :
C, *Copybase
my lsp is:
(defun c:c (command ".copy"))
if use your lsp , it will be changed to Circle instead of Copybase, right?
More suggestion?
 
Egen,
My point was, since REINIT won't overwrite 'functions' that are defun (ed) after startup, just place any re-defined functions in the 'reset.lsp' that you want to redefine. Only other way (without exiting editor) is to (nil) the functions, then do REINIT after nil. You can redefine the C command to whatever you want in reset.lsp, doesn't have to be .Circle.

Bob
 
Try tjis

OPTIONS - SYSTEM - General Options
Put a check in the box next to Reload ACAD.LSP with every drawing

That should clear your functions out of the way and let the PGP function as written

Message was edited by: OLD-CADaver
 
Make a list of your shortcut atoms(subrs).
(defun c:RestorePGPShortcuts ;;<-or use a shorter name ;-) (foreach n '(c:c c:co ....) (set n nil)))

egen said:
Hi, i've a problem:
i've one LSP file, which has my own customized shortcut commands inside, with the content like this:
(defun c:c
(command ".copy")
)
The usage of above is to use the shortcut commands i like on other person's computer, C now stands for Copy, but the problem is
when i finish my job, and let other guys continue, they don't like it , they still want use C for Circle. so, i need reload the DWG file so autocad can load command definition from acad.pgp, which is a little troublesome.
 
That won't work either. Sorry. Should have tested.
Short of closing and opening the drawing, you could
a) implement your shortcuts in a different acad.pgp that would work with your profile and could be chaned with a change in profile/reinit. b) implement your shortcuts with (vlax-add-cmd ...) and then remove them with (vlax-remove-cmd...) which (though I haven't tested) should work better than c:xxx commands. c)learn the office shortcuts. ;-)

Doug Broad said:
Make a list of your shortcut atoms(subrs).
(defun c:RestorePGPShortcuts ;;<-or use a shorter name ;-) (foreach n '(c:c c:co ....) (set n nil)))
C now stands for Copy, but the problem is
when i finish my job, and let other guys continue, they don't like it , they still want
use C for Circle. so, i need reload the DWG
 
Egen,
Probably easier just to Close Acad than try to accomodate hot keys. It is only a couple of clicks. You close, then they open. Not so complicated.

Bob
 
but you need reload something (lsp file or other dwging), right?
 
a)Where's profile/reinit? i'm using autocad 2002 now.
b)Good idea, i will try, thank you.
c) see, i'm so lazy that i have to use my own shortcut, for Copy, C is faster than CO, i really don't want to type so many times O.
 
We have a heavily customized PGP, when new folks show up, we tell to get used to it. But if they really want to be less efficient they can create their own PGP in their network directory. Then all they need to do is add that directory to the top of the Search Path. ACAD loads the first PGP it finds in the path.

So all you need do then is change the top directory in the path and REINIT. When you're done, change it back and REINIT.
 
egen said:
a)Where's profile/reinit? i'm using autocad 2002 now.
options -> profile
b)Good idea, i will try, thank you.
you're welcome
c) see, i'm so lazy that i have to use my own shortcut, for Copy, C is faster than CO, i really don't want to type so many times
O.
I use cc for copy and c for circle. I implemented my keyboard shortcuts the version before Autodesk came out with their PGP files. Most of my shortcuts couldn't be implemented by acad.pgp because I they do more than just shorten the command name. I don't like the shortcuts that ACAD proposed but teach my students those since ACAD's standards will inevitably rule.
 
yes, as i said, if the 10 DWG files opening at the same time, and you need save them one by one, and re-open them again, it's very long time to wait everything back. do you have any command or lsp code to do that, i mean, reload acad.pgp just type some words.
 
good.
and maybe we can have some other convient ways to improve this, and make it faster, do you use any batch file or lsp to do so?
 
We don't, cuz' it doesn't happen that often. What I've found is that most will adapt to our pgp because, one it makes more sense than the one out of the box, and two it has nearly every command and setvar in less than 3 letters.

And our system is completely networked. Everything is on the network, so I rarely have to use someone else's machine for much of anything.

But that doesn't mean you couldn't setup some macro for it.
 

Latest threads

Back
Top