Is it possible to add a zoom all shortcut key to Acad 2000 pgp file?

Discussion in 'AutoCAD' started by Frank, Jan 21, 2008.

  1. Frank

    Frank Guest

    Greetings:

    It's has been many years that I haven't been using AutoCAD. Could
    someone please remind me if it is possible to add a shortcut keys ZA
    for "zoom all" in the AutoCAD 2000 .pgp file?

    I try the following schemes and none of them work:

    ZA, *ZOOM ALL
    ZA, *ZOOM, ALL
    ZA, *ZOOM; ALL
    ZA, *_ZOOM;_ALL

    Any help would be greatly appreciated.
     
    Frank, Jan 21, 2008
    #1
  2. Frank

    Paul Turvill Guest

    Nope, the shortcuts the .pgp file can only *launch* commands; they can't
    pass on any parameters or subcommands (like "ALL"). To create a shortcut
    like the one you want, you'll have to resort to something like a LISP
    routine:

    (defun C:ZA ( )
    (command "zoom" "all")
    (princ)
    )
     
    Paul Turvill, Jan 21, 2008
    #2
  3. Frank

    Frank Guest

    Thank you much for your time and help.
     
    Frank, Jan 21, 2008
    #3
  4. Frank

    strawberry Guest

    but "z a "'s so quick anyway. I wonder why you'd bother.
     
    strawberry, Jan 21, 2008
    #4
  5. I cant see "customize keyboard" under tools? (is it a 2000 thing with me?)

    and
     
    sunnysidedown, Jan 28, 2008
    #5
  6. Frank

    Bill DeShawn Guest

    Read this carefully before beginning:
    Type the following to open ACAD.MNS:
    (startapp "notepad" (findfile "acad.mns"))

    Type Ctrl+F to search for "Accelerators".
    These are the accelerator keys. They are associated with an ID. So,
    if there is a command in the menu that assigns the ID, the accelerator
    should find it and perform the macro behind it. Notice that directly
    above the Accelerators is the Screen menu for the ZOOM commands. Very
    convenient. I have AutoCAD 2006, and am on CUI now, but I saved an
    ACAD.MNS to refer to for things like this. I think that you can
    create a new line with a macro in it like this: [ZE]'_zoom;_e; and
    insert an ID in front of it:
    ID_ZE [ZE]'_zoom;_e;
    Now I'm thinking you have a command and ID associated. I can't test
    this out, but I believe that if your ACCELERATORS refers to the ID_ZE,
    it will call up the macro.
    So you can write a line under "Accelerators" that looks like this:
    ID_ZE [ALT+"F9"]
    I think that doing this will cause the Zoom Extents to happen if you
    press the ALT and F9 keys simultaneously.

    When you're done in ACAD.MNS, type the following, but remember that
    you might have to run EXPRESSMENU if you have EXPRESS TOOLS installed
    and you if you have other menus loaded, you'll have to reload them
    with menuload.
    (command "_.menu" "acad.mns")
    If ACAD.MNS works right, at that point, save it as ACAD.MNU. If it
    fails, and you get frustrated, then hopefully you haven't changed
    ACAD.MNU, so you can load ACAD.MNU:
    (command "_.menu" "acad.mnu"). At that point ACAD.MNS will be
    overwritten to match ACAD.MNU.

    Remember: Do NOT touch ACAD.MNU until everything working correctly.
    Work with ACAD.MNS. When you load ACAD.MNS, it won't overwrite
    ACAD.MNU. But when you load ACAD.MNU, it overwrites ACAD.MNS.
    Therefore ACAD.MNU is your backup in case ACAD.MNS gets messed up.
    Make sure you have tested your changes to ACAD.MNS thoroughly before
    saving as ACAD.MNU.

    Let us know how it goes

    Bill DeShawn
     
    Bill DeShawn, Jan 29, 2008
    #6
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.