Page 1 of 1

Writing dimensions in a dxf file using dxflib

Posted: Thu Nov 03, 2011 8:15 pm
by Frank Marijsse
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?

Posted: Tue Nov 08, 2011 2:55 pm
by andrew
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