Hi
I am trying to create a reactor to toggle mbuttonpan during and after a command. All works fine till I encounter a command which is actually an autolisp/vlisp command and so not a native command. I don't understand reactors that well so all the help is most welcome.
Following is the code I have so far
(vlr-lisp-reactor nil '((:vlr-lispWillStart . MButtonOffSp)(:vlr-lispEnded . MButtonOn)(:vlr-lispCancelled . MButtonOn)))
(vlr-command-reactor nil '((:vlr-commandWillStart . MButtonOff)(:vlr-commandCancelled . MButtonOn)(:vlr-commandFailed . MButtonOn)))
(setq mbr (vlr-command-reactor nil '((:vlr-commandEnded . MButtonOn))))
(defun MButtonOff (Caller CmdSet)(setvar "mbuttonpan" 0))
(defun MButtonOn (Caller CmdSet)(setvar "mbuttonpan" 1))
(defun MButtonOffSp (Caller CmdSet)(vlr-remove mbr)(setvar "mbuttonpan" 0)) ;Special condition to stop Command and Lisp reactors fighting. Add to lispWillStart
As you will notice I tried to remove one of the reactors to get lisp commands to work but after this I cannot toggle mbuttonpan for the following native commands.
Any advise
Thanks
Wow its almost a month and yet no reply. Come on guys surely one of you will have some suggestions for me.....