Losing entities when exporting DXF

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
dt-protec
Posts: 3
Joined: 26 Jul 2017, 16:38

Losing entities when exporting DXF

Post by dt-protec » 26 Jul 2017, 18:40

Hi,

I'm using V11.2 of CAD.NET. I have an issue when exporting one single entity of type INSERT to DXF. When loading the file again, the entity is still there, but not visible anymore. Debugging pointed out that its box has wrong values (-1e+20, +1e+20) after reload.

Any suggestions what's wrong here? Thanks :)

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Losing entities when exporting DXF

Post by support » 26 Jul 2017, 19:40

Hello,

Did you load the INSERT entity from a file before saving to DXF or create it programmatically?


Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

dt-protec
Posts: 3
Joined: 26 Jul 2017, 16:38

Re: Losing entities when exporting DXF

Post by dt-protec » 27 Jul 2017, 11:53

I loaded the entity from a DWG file. What I do is to open a DWG file with lots of entities, select a set of them to copy them into a new CADImage and then store them as DXF.

I tried some other things:
- Select all entities and store them: The INSERT entity is lost
- Directly store the whole drawing as DXF: The INSERT entity persists

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Losing entities when exporting DXF

Post by support » 27 Jul 2017, 18:18

Hello,

If you copy INSERT entities without the BLOCK objects they refer to into a new CADImage, it is not correct. You will have to find a corresponding BLOCK object using a CADInsert.Block property and copy it to a new CADImage instance as well.


Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

dt-protec
Posts: 3
Joined: 26 Jul 2017, 16:38

Re: Losing entities when exporting DXF

Post by dt-protec » 28 Jul 2017, 14:27

Thanks a lot, that solved the problem!

Post Reply