vlax-add/remove-cmd
hey guysIm having a bit of truble with those two commands.
Simply im finding that if i load it into one drawing1, then load in into drawing2, drawing 1 will lose its command and return
The reason im using it is because when it come to re-defineing commands i thought this would be easyer
Here is an example where its inbeded in a Foreach function of each function
and where NewKeyList is a list of what the are to be defined as
(vlax-remove-cmd (cadr nm)) (if NewKeyList (progn (setenv (car nm) (nth Int_Count NewKeyList)) (setq Int_Count (1+ Int_Count)))) (eval (read (strcat "(vlax-add-cmd \""(getenv (car nm)) "\" '" (caddr nm)")")))
thanks for any input
flower
Could you not use for example:
(if (not c:fillet) (command "._UNDEFINE" "_FILLET"))
then put same command name for your lisp routine. Sorry when i said redefining commands i am refering to routines
thus
(defun c:hi () (princ "hi") (princ))(command "._UNDEFINE" "hi"))
returns
Unknown command name.
SystemProtection-V.1.Lsp seems like a namespace issue if you're going that way.You might like to try (Setq c:hi nil) or do a vl-load-all call when i press hi returns
Could you explan this vl-load-all call
since every thing is in a .vlx
Aswell i would like it to transfer threw open doc's if possible
Cheers Flower Have you tried using vl-acad-undefun?
This works for me:
(foreach x '(c:routine1 c:routine2 c:routineN) (vl-acad-undefun x)) Welcome to CADTutor Steve - nice to see you here Thanks Lee! : ) Cheers mate works great didnt think to lookin in VL for undefun Glad to help!
页:
[1]