This project has moved. For the latest updates, please go here.

Pb in ReadAttributeDefinition

Dec 14, 2012 at 8:57 AM


in ReadAttributeDefinition() you initialise widthFactor with value 0

In my DXF, if the widthFactor equal 1.0, dxfPair 41 is not written, so widtFactor stays to 0 value and this generates an error.

I don't know if it's a correct structure, but an AUDIT command in AutoCAD on my DXF doesn't show any error.


Dec 14, 2012 at 11:56 AM

Yes, there is a little problem with that. By default a dxf uses 1.0 for the widthFactor that's why code 41 is not written when using the default value. But when you create a new AttributeDefinition I was using the one defined by its associated TextStyle by default. Later on you can override this value with the WidthFactor property.

I need to check this, if the AttributeDefiniton has no code 41 the TextStyle width factor should be used, if code 41 is defined this value will be used. In any case the width factor should always be greater than zero.