TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: dubb on May 31, 2005, 06:34:31 PM
-
is there a way to trigger another lisp command after running the plot command?
-
Sure, use the :vlr-commandended event of the Editor reactor and watch for the "Plot" command command.
-
HUH..?..IM UNFAMILIAR ON HOW TO USE THESE REACTORS...
-
OK, I couldn't recall if you had worked with reactors before. Here's an example for you:
(or jmm:plot_reactor
(setq jmm:plot_reactor (vlr-editor-reactor nil '((:vlr-commandEnded . jmm:cmdEnd)))))
(defun jmm:cmdEnd (calling cmd)
(princ ".....made it here....");remove this, just for testing....
(cond ((eq "PLOT" (strcase (car cmd))) (jmm:testlisp))
;you could add other commands to track and do other things here
)
(princ)
)
(defun jmm:testlisp ()
(princ "Command was PLOT")
;modify the line above to call the desired lisp
;NOTE! The lisp you call must NOT use the Command function!
)
-
oOO..MAN..that worked perfect..thanks Jeff
-
Just make sure you obey the NO COMMAND in the lisp you put that in.
-
" (or jmm:plot_reactor
(setq jmm:plot_reactor (vlr-editor-reactor nil '((:vlr-commandEnded . jmm:cmdEnd))))) "
...Nice trick Jeff.
Edit: Darn button!?
Thats "clean" I like that.