You can do it that way or you can just create it in the
same scope as the other reactor, and set a flag in the
latter, and check/clear the flag in the command-ended
reactor. If you chose to create or add the command
reactor in another reactor, then you would have to
remove it after it handles the command-ended notification.
Cliff Middleton wrote:
>
> Would I have to create a command-reator during the callback from the
> object-reator to fire another callback on command-ended notification?
>
> Tony Tanzillo wrote in message
> news:398ADD53.80192011@worldnet.att.net...
> | You cannot always access objects through ActiveX during some
> | reactor notifications. In this case, AutoCAD must create
> | a ActiveX wrapper for the new object before it can be accessed
> | through ActiveX, and probably can't do that until after the
> | copy notification is completed.
> |
> | You should collect the enames in list, store themin a global,
> | and then in some later notification (like command-ended) act
> | on the objects.
> |
> | Cliff Middleton wrote:
> | >
> | > R15
> | >
> | > Tony Tanzillo wrote in message
> | > news:39872E9A.9CD8E07B@worldnet.att.net...
> | > | What release of AutoCAD are you using?
> | > |
> | > | Cliff Middleton wrote:
> | > | >
> | > | > I am trying to attach reactors to a copied blockref object which has
> | > | > reactors attached. First, why don't the reactors go with the copied
> | > object
> | > | > in the first place and second, why can't you convert the ename of
> the
> | > newly
> | > | > created object to a vla-object? I get the following error values
> when
> | > the
> | > | > subr below is called:
> | > | >
> | > | > [0.61] (VL-BT)
> | > | > [1.57] (*ERROR* "Automation Error. Description was not provided.")
> | > | > [2.52] (_call-err-hook # "Automation Error.
> | > | > Description
> | > | > was not provided.")
> | > | > [3.46] (sys-error "Automation Error. Description was not provided.")
> | > | > :ERROR-BREAK.41 nil
> | > | > [4.38] (intelligent-invoke #
> | > | > "ObjectIdToObject" 1 24831232)
> | > | > [5.30] (# #
> IAcadDocument
> | > | > 00b91294> "ObjectIdToObject" 24831232)
> | > | > [6.24] (vla-ObjectIDToObject #
> | > 24831232)
> | > | > [7.18] (vlax-ename->vla-object )
> | > | > [8.13] (BDR:REACTION-COPIED #
> 04024074>
> | > | > # ())
> | > | > :CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)
> | > | > :REACTOR-CALLBACK.3 :REACTOR-CALLBACK
> | > | >
> | > | > As you can see this is my first reactor attempt. Enlighten me,
> friends.
> | > | >
> | > | >
> | >
> ;BDR:REACTION-COPIED________________________________________________________
> | > | > _____________________________________________________
> | > | > ;Reactor callback to attach reactors to a copied border
> | > | >
> | > | > (defun bdr:reaction-copied (notifier-object reactor-object
> | > parameter-list /
> | > | > blockname blkref)
> | > | >
> | > | > (setq
> | > | > blockname (vlr-data reactor-object)
> | > | > blkref (vlax-ename->vla-object (car parameter-list)) ;THE NEWLY
> | > CREATED
> | > | > OBJECT
> | > | > )
> | > | > (vlr-pers
> | > | > (vlr-object-reactor
> | > | > (list blkref)
> | > | > blockname
> | > | > '((:vlr-erased . bdr:reaction-erased)(:vlr-copied .
> | > bdr:reaction-copied))
> | > | > )
> | > | > )
> | > | > )
> | > | >
> | > | > --
> | > | >
> | > | > Cliff Middleton, Tool Engineering Manager
> | > | > General Broach Company
> | > | > ph 517 458 7555 fax 517 458 6821
> | > | > ICQ 31386833
> | > | >
> | > | > Broaching...learn it, live it, love it.
> | > | > www.generalbroach.com
> | > |
> | > | --
> | > |
> | > | Checkout the AcadX(tm) ActiveX Extension Library at:
> | > |
> | > | http://www.caddzone.com/acadx/acadx.htm
> | > |
> | > | /*********************************************************/
> | > | /* Tony Tanzillo Design Automation Consulting */
> | > | /* Programming & Customization for AutoCAD & Compatibles */
> | > | /* ----------------------------------------------------- */
> | > | /* tony.tanzillo@worldnet.att.net */
> | > | /* http://www.caddzone.com */
> | > | /*********************************************************/
> |
> | --
> |
> | Checkout the AcadX(tm) ActiveX Extension Library at:
> |
> | http://www.caddzone.com/acadx/acadx.htm
> |
> | /*********************************************************/
> | /* Tony Tanzillo Design Automation Consulting */
> | /* Programming & Customization for AutoCAD & Compatibles */
> | /* ----------------------------------------------------- */
> | /* tony.tanzillo@worldnet.att.net */
> | /* http://www.caddzone.com */
> | /*********************************************************/
--
Checkout the AcadX(tm) ActiveX Extension Library at:
http://www.caddzone.com/acadx/acadx.htm
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* tony.tanzillo@worldnet.att.net */
/* http://www.caddzone.com */
/*********************************************************/