PDA

View Full Version : Reactor doesn't work in Acad2005


Borg
2005-01-18, 09:25 PM
This code worked in 2004 but I just noticed that is not reacting in 2005.
Any suggestions?

(vl-load-com)
(if (not (vl-bb-ref 'ContinuationCopyFlag))
(progn
(vlr-command-reactor
"Continuation Copy"
'((:vlr-commandended . ContinuationCopy))
)
(vl-bb-set 'ContinuationCopyFlag t)
)
)
(defun ContinuationCopy (Calling-Reactor EndCommandInfo)
(setq TheCommandEnded (nth 0 EndCommandInfo))
(if (= TheCommandEnded "COPY")
(if (and
(wcmatch (cdr (assoc 0 (entget (entlast)))) "INSERT")
;If it is a block
(wcmatch (cdr (assoc 2 (entget (entlast)))) "CONT*")
;and it is a continuation
)
(progn
(alert
(strcat "Copying continuations isn't permitted!!"
;Send alert to user
"\nYour copy will be deleted and you will be taken"
"\nto the Continuation menu so that you can"
"\ninsert one properly"
)
)
(vla-delete (vlax-ename->vla-object (entlast)))
;delete the copy
(menucmd "I=PES2002.cont1")
(menucmd "I=*")
;(menucmd "$i=PES2002.cont1")
;(menucmd "$1=*")
)

)

)
)