Persistent Reactors

Persistent Reactors

Anonymous
Not applicable
509 Views
3 Replies
Message 1 of 4

Persistent Reactors

Anonymous
Not applicable
I have a class derived from AcDbObject that is serving as a persistent
reactor. This class has a member called m_TargetPoint which is basically
the center of the Acad entity it refers to. In the AcDbObject::modified( )
function, i examine my stored m_TargetPoint vs. the ACTUAL point where that
entity is. If the two are different, it means that the user has moved the
entity. That all works great, but only during my current session. I can't
figure out what i need to do to cause my reactor to actually file that
member out! Obviously with most entities, you just open it for write and
assert, and it writes its members out. However, i'm not opening or closing
any of the reactors myself - AutoCAD is managing that. What do i have to do
to cause my reactor to file itself? As of right now, it seems that the only
time the reactor ever files its members to the drawing is when it is
initially created.
0 Likes
510 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Does any object in the drawing own your reactor? An object will be filed
out if it is owned by another object. I can't think of any situation were
an object will be filed out and not be a part of the ownership hierarchy.
Maybe someone else does.

"Justavian" wrote in message
news:[email protected]...
> I have a class derived from AcDbObject that is serving as a persistent
> reactor. This class has a member called m_TargetPoint which is basically
> the center of the Acad entity it refers to. In the
AcDbObject::modified( )
> function, i examine my stored m_TargetPoint vs. the ACTUAL point where
that
> entity is. If the two are different, it means that the user has moved the
> entity. That all works great, but only during my current session. I
can't
> figure out what i need to do to cause my reactor to actually file that
> member out! Obviously with most entities, you just open it for write and
> assert, and it writes its members out. However, i'm not opening or
closing
> any of the reactors myself - AutoCAD is managing that. What do i have to
do
> to cause my reactor to file itself? As of right now, it seems that the
only
> time the reactor ever files its members to the drawing is when it is
> initially created.
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
Do persistent AcDbObject derived reactors get automatically cloned when it's
target entity gets cloned, or do i have to manually build a hard pointer
relationship or something? Thanks ahead of time...
0 Likes
Message 4 of 4

Anonymous
Not applicable
No they are not cloned. Establishing a hardpointer relationship would get
them cloned for wblock, but not for deepClone or clone().

"Justavian" wrote in message
news:[email protected]...
> Do persistent AcDbObject derived reactors get automatically cloned when
it's
> target entity gets cloned, or do i have to manually build a hard pointer
> relationship or something? Thanks ahead of time...
>
>
0 Likes