Copying custom object to new drawing - problem with save

Copying custom object to new drawing - problem with save

Anonymous
Not applicable
429 Views
2 Replies
Message 1 of 3

Copying custom object to new drawing - problem with save

Anonymous
Not applicable

Hi, I have encountered a strange behaviour.

I draw my custom entity on DRAWING1.

 

Then I copy it, using CTRL+C.

Next, I create a new drawing and paste this object using CTRL+V.

Everything seems to work fine, but neither subDeepClone, nor subWblockClone gets called. Then, when I try to save the new drawing, the files is saved, but I get a message: "Warning: There was an error while saving the file. You should call REPAIR command for this drawing."

After I call REPAIR or audit it finds no errors.

What could be the reason?

0 Likes
430 Views
2 Replies
Replies (2)
Message 2 of 3

owenwengerd
Advisor
Advisor

The problem is in your dwgOutFields() and dwgInFields() functions, likely not filing out a needed hard reference or a reference to an object in a different database.

--
Owen Wengerd
ManuSoft
0 Likes
Message 3 of 3

Anonymous
Not applicable

It's not that. I don't have any such references. I call AcDbEntity::dwgOut and then write some ints to the filer. That'a all.

This problem is connected with: http://forums.autodesk.com/t5/objectarx/custom-copy-mechanism/td-p/5917404

 

0 Likes