ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Persistent reactor and copy

9 REPLIES 9
Reply
Message 1 of 10
Anonymous
514 Views, 9 Replies

Persistent reactor and copy

Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: Anonymous

Hi,
why not use transparent reactor? implement a class derived from
AcDbObjectReactor.
AcDbObjectReactor has the same interface as persistent reactor which
actually is a AcDbObject, but it doesn't need to be stored in database.

Thanks
-Jerry

"Ah Koh" дÈëÏûÏ¢ÐÂÎÅ:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 3 of 10
Anonymous
in reply to: Anonymous

Hi Jerry,
Transient reactor?
The specification required the reactor to be stored in database.....

Thanks for your reply...

cheers.


koh
"shichongdong" wrote in message
news:5059315@discussion.autodesk.com...
Hi,
why not use transparent reactor? implement a class derived from
AcDbObjectReactor.
AcDbObjectReactor has the same interface as persistent reactor which
actually is a AcDbObject, but it doesn't need to be stored in database.

Thanks
-Jerry

"Ah Koh" дÈëÏûÏ¢ÐÂÎÅ:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 4 of 10
Anonymous
in reply to: Anonymous

When your object is copied, you will receive endDeepClone notification. You
can implement a reactor for endDeepClone that removes the persistent reactor
from your copied object.

"Ah Koh" wrote in message news:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 5 of 10
Anonymous
in reply to: Anonymous

Cool, that indeed help me....
Thanks.

Koh
"Michael Riley" wrote in message
news:5060038@discussion.autodesk.com...
When your object is copied, you will receive endDeepClone notification. You
can implement a reactor for endDeepClone that removes the persistent reactor
from your copied object.

"Ah Koh" wrote in message news:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 6 of 10
Anonymous
in reply to: Anonymous

Hi,
Another approach is to override the AcDbObject::deepClone virtual function
which will be called when copy happens.
In this virtual function, you can access the cloned object. Use
AcDbObject::reactors to get all the reactors ( transient and persist
reactor). Use acdbIsPersistentReactor to check whether the reactor is
persistent or not. You can delete the copied persistent reactor and set the
cloned object with the old persistent reactor.

Thanks
-Jerry

"Michael Riley" дÈëÏûÏ¢ÐÂÎÅ:5060038@discussion.autodesk.com...
When your object is copied, you will receive endDeepClone notification. You
can implement a reactor for endDeepClone that removes the persistent reactor
from your copied object.

"Ah Koh" wrote in message news:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 7 of 10
Anonymous
in reply to: Anonymous

Thanks Jerry, for giving me another alternatives........

Are you a Chinese?
Anyway, wishing you a Happy CNY.

Cheers.....

Koh

"shichongdong" wrote in message
news:5060874@discussion.autodesk.com...
Hi,
Another approach is to override the AcDbObject::deepClone virtual function
which will be called when copy happens.
In this virtual function, you can access the cloned object. Use
AcDbObject::reactors to get all the reactors ( transient and persist
reactor). Use acdbIsPersistentReactor to check whether the reactor is
persistent or not. You can delete the copied persistent reactor and set the
cloned object with the old persistent reactor.

Thanks
-Jerry

"Michael Riley"
дÈëÏûÏ¢ÐÂÎÅ:5060038@discussion.autodesk.com...
When your object is copied, you will receive endDeepClone notification. You
can implement a reactor for endDeepClone that removes the persistent reactor
from your copied object.

"Ah Koh" wrote in message news:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 8 of 10
Anonymous
in reply to: Anonymous

Hi Koh,
I guess that it's my ID (shichongdong) that exposes my nationality and you
maybe kow a little about China and Chinese:)
Yes, the CNY (spring festival) is coming soon. Thanks for your best wish
and wish you have a good luck in the new year.

Focus on the real topic. I'm afraid that override the AcDbObject's virtual
function is more reliable than the reactor's virtual function.
To implement the functionality in event handler, when you are trying to port
the custom object to another application, AcEditorReactor::endDeepClone need
to be implemented again while to implement in custom object module doesn't.

Thanks
-Jerry

"Ah Koh" дÈëÏûÏ¢ÐÂÎÅ:5062046@discussion.autodesk.com...
Thanks Jerry, for giving me another alternatives........

Are you a Chinese?
Anyway, wishing you a Happy CNY.

Cheers.....

Koh

"shichongdong" wrote in message
news:5060874@discussion.autodesk.com...
Hi,
Another approach is to override the AcDbObject::deepClone virtual function
which will be called when copy happens.
In this virtual function, you can access the cloned object. Use
AcDbObject::reactors to get all the reactors ( transient and persist
reactor). Use acdbIsPersistentReactor to check whether the reactor is
persistent or not. You can delete the copied persistent reactor and set the
cloned object with the old persistent reactor.

Thanks
-Jerry

"Michael Riley"
D¡ä¨¨????¡éD???:5060038@discussion.autodesk.com...
When your object is copied, you will receive endDeepClone notification. You
can implement a reactor for endDeepClone that removes the persistent reactor
from your copied object.

"Ah Koh" wrote in message news:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 9 of 10
Anonymous
in reply to: Anonymous

Hi Jerry,

Thanks for the analyse and agree with you.

Thanks the reason i'm using persistent reactor which derive from AcDbobject.

Thanks again.
Koh
"shichongdong" wrote in message
news:5062088@discussion.autodesk.com...
Hi Koh,
I guess that it's my ID (shichongdong) that exposes my nationality and you
maybe kow a little about China and Chinese:)
Yes, the CNY (spring festival) is coming soon. Thanks for your best wish
and wish you have a good luck in the new year.

Focus on the real topic. I'm afraid that override the AcDbObject's virtual
function is more reliable than the reactor's virtual function.
To implement the functionality in event handler, when you are trying to port
the custom object to another application, AcEditorReactor::endDeepClone need
to be implemented again while to implement in custom object module doesn't.

Thanks
-Jerry

"Ah Koh" дÈëÏûÏ¢ÐÂÎÅ:5062046@discussion.autodesk.com...
Thanks Jerry, for giving me another alternatives........

Are you a Chinese?
Anyway, wishing you a Happy CNY.

Cheers.....

Koh

"shichongdong" wrote in message
news:5060874@discussion.autodesk.com...
Hi,
Another approach is to override the AcDbObject::deepClone virtual function
which will be called when copy happens.
In this virtual function, you can access the cloned object. Use
AcDbObject::reactors to get all the reactors ( transient and persist
reactor). Use acdbIsPersistentReactor to check whether the reactor is
persistent or not. You can delete the copied persistent reactor and set the
cloned object with the old persistent reactor.

Thanks
-Jerry

"Michael Riley"
D¡ä¨¨????¡éD???:5060038@discussion.autodesk.com...
When your object is copied, you will receive endDeepClone notification. You
can implement a reactor for endDeepClone that removes the persistent reactor
from your copied object.

"Ah Koh" wrote in message news:5058053@discussion.autodesk.com...
Hello World,

I understand that when we copy an object, any persistent reactors attached
to the object are copied as well.
Is there anyway to remove the copied objects' persistent reactor?

Thanks in advance.


Koh
Message 10 of 10
dellagustin
in reply to: Anonymous

isn't easier to remove it at dwgInFields? just look at the filer type, if it1s a copyFiler remove the prsistent reactors

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost