AcDbObject::Deepclone and SoftPointers

AcDbObject::Deepclone and SoftPointers

Anonymous
Not applicable
466 Views
2 Replies
Message 1 of 3

AcDbObject::Deepclone and SoftPointers

Anonymous
Not applicable
Hi

I have two objects A, B derived from AcDbEntity, with worldDraw overriding method, using geometry polyline (array of AcGePoint3d) primitive to generate the entity graphic in object B, and object a is derived form AcDbBlockReference..

Object A has a soft pointer reference to B, and B has soft pointer reference to A, (reflexive relation betwen them). when I use AcDbObject:: deepclone and copy objects A and B the polyline graphic produced in the cloned object B is corrupted (there are more points in the array of AcGePoint3d) .

I'm using exactly the same code in the example of AdskPoly (SDK objectARX docummentation and examples).

Somebody could help me please, thanks a lot, (excuse my english).
0 Likes
467 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Hi,

This is probably because your dwgInFields() method does not clean teh point
array before reading the clone, so you end up with more points than
expected.

cheers
cyrille
0 Likes
Message 3 of 3

Anonymous
Not applicable
Dear friend, thanks for your help.

but I have another questions.

if copy only entity B (derived from acdbentity, with overriding AcDbObject::worldraw) the cloned B entity is ok, the problem arise when I copy entity B and entity A (derived from AcDbBlockReference) together and using softpointer reference between them.

are there problems with soft pointer references?

again thanks a lot Cyrille.

or I don't use soft pointer reference between entities, and again cloned entities A and B are OK
0 Likes