Community
Hi, I need ot append events when the dimstyle is change using the AutoCAD dimstyle popup list, but don't know which reactoer to use. I tried with Comman begin and end, and Sysvawill change and changed, but they don't detect the dimstyle changes.
Which reactor I should use?
Thanks
Marcel
Marcel,
What is the action you would like to take after dimstyle update?
what about saving the dimvars before dimstyle is started (:vlr-commandWillStart)
and compare them after dimstyle is done (:vlr-commandEnded)
Moshe
Try this quick sample
(vl-load-com) ;; credits to SMADSEN (if (not *react*) (setq *react* (vlr-command-reactor nil '((:vlr-commandWillStart . startCommand) (:vlr-commandEnded . endCommand) (:vlr-commandCancelled . cancelCommand) (:vlr-commandFailed . failedCommand) ) ) ) ) (defun startCommand (calling-reactor startcommandInfo / BGN ) (setq BGN (nth 0 startcommandInfo)) (if (eq BGN "DIMSTYLE") (setvar "modemacro" "Current Dimstyle: $(getvar,dimstyle)") ) ) (defun endCommand (calling-reactor endcommandInfo / END) (setq END (nth 0 endcommandInfo)) (setq OLD (getvar 'dimstyle)) (if (eq END "DIMSTYLE") (setvar "modemacro" "Current Dimstyle: $(getvar,dimstyle)") ) ) (defun cancelCommand (calling-reactor cancelcommandInfo / CNL) (setq CNL (nth 0 cancelcommandInfo)) (if (eq CNL "DIMSTYLE") (setvar "modemacro" "Current Dimstyle: $(getvar,dimstyle)") ) ) (defun failedCommand (calling-reactor failedcommandInfo / FLD) (setq FLD (nth 0 failedcommandInfo)) (if (eq FLD "DIMSTYLE") (setvar "modemacro" "Current Dimstyle: $(getvar,dimstyle)") ) )
~'J'~