Author Topic: How to check the hotkey?  (Read 9726 times)

0 Members and 1 Guest are viewing this topic.

mikd

  • Guest
How to check the hotkey?
« Reply #15 on: January 08, 2004, 11:48:01 AM »
Dear Ladies and Gentlemen thank you very much for your support!
- The statement (= nil C:SOMETHING) return T if there is AutoCAD command or aliases
- The nice line (atoms-family 1) return the names of all lisp (and maybe arx) functions with “C:bla-bla” and without it.
All of there a check more carefully and post result.
Great! Thank you very much!

SMadsen

  • Guest
How to check the hotkey?
« Reply #16 on: January 08, 2004, 11:50:46 AM »
Here's one that could be used to locate a shortcut in the pgp file. If found, it returns the shortcut, otherwise nil:

(doesThisShortcutReallyExist? "CO")
"CO"

(doesThisShortcutReallyExist? "COPYCAT")
nil

Oh, you might want to change the function name :)

Code: [Select]
(defun doesThisShortcutReallyExist? (shortcut / chrlst ln pgp pgpfo pos)
  (cond ((setq pgp (findfile "acad.pgp"))
         (setq pgpfo (open pgp "r"))
         (while (setq ln (read-line pgpfo))
           (and (/= (substr ln 1 1) ";")
                (setq pos (vl-string-position (ascii ",") ln))
                (setq chrlst (cons (substr ln 1 pos) chrlst))
           )
         )
         (close pgpfo)
        )
  )
  (car (member shortcut chrlst))
)

SMadsen

  • Guest
How to check the hotkey?
« Reply #17 on: January 08, 2004, 11:58:06 AM »
And to search in the atoms list:

(doesThisCommandExistAsALoadedApplication? "APO")
"C:APO"

(doesThisCommandExistAsALoadedApplication? "APOOH")
nil

Code: [Select]
(defun doesThisCommandExistAsALoadedApplication? (cmd)
  (car (member (strcat "C:" cmd) (atoms-family 1)))
)

deegeecees

  • Guest
How to check the hotkey?
« Reply #18 on: January 08, 2004, 12:05:51 PM »
Mikd,
Your welcome. If you or your administrator installed AutoCAD with the help sections included, I know that from version 2000 on, there is a "Developers Help" section that has a vast amount of information to help you along on your path to enlightenment in the world of AutoCAD. I know that finding something such as "atoms-family" is a bit of a stretch, but take some time out to peruse this volume as it will enrich your life as well as your soul.

kerryb

  • Guest
How to check the hotkey?
« Reply #19 on: January 08, 2004, 05:14:50 PM »
If you have Express Tools :

ALIASEDIT  at the command line gives a listing of PGP commands.