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
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:
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.
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.