Restore definition of acad.pgp

Discussion in 'AutoCAD' started by egen, Feb 1, 2004.

  1. egen

    egen Guest

    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 .
     
    egen, Feb 1, 2004
    #1
  2. egen

    ECCAD Guest

    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
     
    ECCAD, Feb 1, 2004
    #2
  3. egen

    egen Guest

    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, Feb 3, 2004
    #3
  4. egen

    ECCAD Guest

    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
     
    ECCAD, Feb 3, 2004
    #4
  5. egen

    OLD-CADaver Guest

    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
     
    OLD-CADaver, Feb 6, 2004
    #5
  6. egen

    Doug Broad Guest

    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)))




    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.
     
    Doug Broad, Feb 6, 2004
    #6
  7. egen

    Doug Broad Guest

    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. ;-)



    C now stands for Copy, but the problem is
    use C for Circle. so, i need reload the DWG
     
    Doug Broad, Feb 6, 2004
    #7
  8. egen

    ECCAD Guest

    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
     
    ECCAD, Feb 6, 2004
    #8
  9. egen

    egen Guest

    but you need reload something (lsp file or other dwging), right?
     
    egen, Feb 7, 2004
    #9
  10. egen

    egen Guest

    Good idea, i will try, thank you.
     
    egen, Feb 7, 2004
    #10
  11. egen

    egen Guest

    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.
     
    egen, Feb 7, 2004
    #11
  12. egen

    OLD-CADaver Guest

    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.
     
    OLD-CADaver, Feb 7, 2004
    #12
  13. egen

    Doug Broad Guest

    options -> profile
    you're welcome
    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.
     
    Doug Broad, Feb 7, 2004
    #13
  14. egen

    egen Guest

    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.
     
    egen, Feb 14, 2004
    #14
  15. egen

    egen Guest

    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?
     
    egen, Feb 14, 2004
    #15
  16. egen

    OLD-CADaver Guest

    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.
     
    OLD-CADaver, Feb 14, 2004
    #16
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.