Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mbuttonpan Reactor to work with Lisp

1 REPLY 1
Reply
Message 1 of 2
VGonsalves
450 Views, 1 Reply

Mbuttonpan Reactor to work with Lisp

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

Tags (2)
1 REPLY 1
Message 2 of 2
VGonsalves
in reply to: VGonsalves

Wow its almost a month and yet no reply. Come on guys surely one of you will have some suggestions for me.....

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost