Writing dimensions in a dxf file using dxflib

Use this forum to ask questions about how to do things in dxflib.

Moderator: andrew

Writing dimensions in a dxf file using dxflib

Postby Frank Marijsse » Thu Nov 03, 2011 8:15 pm

I don't succeed to write dimensions in a dxf file that can be imported in AutoCAD 2010. I have written a dimension style with writeDimStyle() and a linear dimension entity with writeDimLinear().
AutoCAD imports the file without message but the dimension is not visible. DXFOUT in AutoCAD writes the dimension again in an output file.
When I replace part of a dxf file that contains a dimension entity drawn in AutoCAD by the part out of my DXF file it can be imported on the condition that the entity refers to a block that defines the look.

Is it possible to write dimension entities on an easy way using the library functions?
Frank Marijsse
Registered Member
 
Posts: 1
Joined: Thu Nov 03, 2011 6:36 pm

Postby andrew » Tue Nov 08, 2011 2:55 pm

dxflib cannot write the block that represents the rendered dimension entity as it simply does not have the logic to render a dimension entity (or any other entity). That would be beyond the scope of dxflib.

That block should not be necessary as it is redundant and most likely was included in the file format for performance reasons.

My best guess is that your layer color might have the same color as the background color in autocad which would make the dimension entity appear to be invisible. In that case, try changing the color of your layer.

Other things to check:
- Does select all in autocad show anything (blue dots)?
- autocad 'regen' command
User avatar
andrew
Site Admin
 
Posts: 2548
Joined: Fri Mar 30, 2007 6:07 am


Return to dxflib 'How Do I' Questions

Who is online

Users browsing this forum: No registered users and 1 guest