View Full Version : why does vlr-insert-reactor doesn't work?
tangchang_21
2009-08-13, 12:58 PM
I want do some thing when a block was been inserted into autocad,so I make a reactor like this:
(vlr-insert-reactor nil '((:vlr-endinsert . vlr-trace-reaction)))
but it doesn't work when I have inserted any block. It seems like this reactor was never exsited.
Hope you can help me. Thanks.
ccowgill
2009-08-13, 02:31 PM
Welcome to AUGI and congrats on your first post.
I have always used a command reactor for causing commands to fire when inserting a block.
(if (not Command_Ending_Reactor)
(setq Command_Ending_Reactor
(vlr-command-reactor
nil
'((:vlr-commandended
.
Command_Ended_Command
)
)
) ;_ end of vlr-command-reactor
) ;_ end of setq
() ;_ the reactor is already loaded
) ;_ end of if
then I define my command ended command with the in reactor name and the in command, and compare the in command to the command I am looking for, in your case "insert" or "-insert" If it matches, it will run the program.
tangchang_21
2009-08-13, 03:28 PM
Well,thank you very much for helping me.
I'll go and try that! :)
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.