CAD/CAM discussion forum > CAD > Command and Mouse reactor in autolisp not working in ZWCAD

Command and Mouse reactor in autolisp not working in ZWCAD

Rank: 1

sathiyanathan

Newbie

posts: 19

Registered: 2011-7-12

Message 1 of 5

 Command and Mouse reactor in autolisp not working in ZWCAD
13-09-2012 03:20 . pm | View his/her posts only
Hai

Command and Mouse reactor in autolisp not working in ZWCAD. Even sample code given in the help also have not work.

Please give me the workable code with user guideline for how to run and test it.

Rank: 1

seav735587

Newbie

posts: 9

Registered: 2012-9-7

Message 2 of 5

14-09-2012 03:19 . pm | View his/her posts only
I don't know about Zwcad.

Just tested our lisp code in Zwcad+.
Command and mouse reactor working correctly.

Rank: 1

sathiyanathan

Newbie

posts: 19

Registered: 2011-7-12

Message 3 of 5

14-09-2012 04:10 . pm | View his/her posts only
Thanks for your replay.

Please give me a sample code and user guideline for how to run it

Rank: 1

seav735587

Newbie

posts: 9

Registered: 2012-9-7

Message 4 of 5

14-09-2012 05:28 . pm | View his/her posts only
; This code runs once after loading

(if (not $vlrloaded)
(progn
(defun CmdEndFun (robj cmd)
(princ "\nCmdEndFun ! :")
(princ cmd)
)
(defun RClickFun (robj plist)
(princ "\nRClick !")
)
(defun CleanReactors (robj plist)
(vlr-remove-all)
)

(vl-load-com)
(vlr-remove-all)
(vlr-command-reactor nil (list (cons :vlr-commandEnded 'CmdEndFun)))
(vlr-mouse-reactor nil (list (cons :vlr-beginRightClick 'RClickFun)))
(vlr-dwg-reactor nil (list (cons :vlr-beginClose 'CleanReactors)))
(setq $vlrloaded T)
)
)

Rank: 1

sathiyanathan

Newbie

posts: 19

Registered: 2011-7-12

Message 5 of 5

15-09-2012 11:26 . am | View his/her posts only
Hai Seav735587

Excellent job, It's work fine. Thanks.....
See also