Ron,
Here is the code I did, let me know if it works for you. Right now it prompts you with how to call the lisp funtion that won't work anymore.
(defun c:ResetPgp (/ pgpFile Opened TextLine ComamndList LispRoutine)
(if (setq pgpFile (findfile "acad.pgp"))
(progn
(setq Opened (open pgpFile "r"))
(while (setq TextLine (read-line Opened))
(if
(and
(/= (substr TextLine 1 1) ";")
(vl-string-search "," TextLine)
(vl-string-search "*" TextLine)
)
(setq CommandList
(cons
(cons
(strcase (substr TextLine 1 (vl-string-search "," TextLine)))
(strcat "." (substr TextLine (+ 2 (vl-string-search "*" TextLine))))
)
CommandList
)
)
)
)
(close Opened)
(foreach LispRoutine (vl-remove-if-not '(lambda (x) (= (strcase (substr x 1 2)) "C:")) (atoms-family 1))
(if (setq tmpList (assoc (strcase (substr LispRoutine 3)) CommandList))
(progn
(eval (read (strcat "(defun c:" (car tmpList) " () (command \"." (cdr tmpList) "\") (princ) )")))
(prompt (strcat "\n Lisp routine \"" (substr LispRoutine 3) "\" is repalced with acad.pgp command alias."))
)
)
)
)
)
(princ)
)
[/quote]
Tim
Thanks for sharing this one, I see now that I have some cleanup to do.
Gary