Attribute Text Alignment

Jan 3, 2013 at 2:05 PM


I noticed that the Alignment was commented out of the WriteAttribute (codes 72 & 74). I assume this was commented because it wasn't working. I think I know what the problem is...the sequence of the codes. I can only get it to work if 72 is written after 1 (attribute value) and 74 after 70.

So the order would be 1, 72, 11,21,31,100,2,70, 74. If 72 is written any later it ignores and uses the insertion.


Jan 8, 2013 at 10:01 AM

Changing the order seems to fix the problem, even with AutoCAD 2005 that gave me an error while loading files with text alignment codes.

Althought those codes (72 and 74) appear together in dxf documentation for the ATTRIB entities, it seems that the order DOES matter. This contradicts the dxf documentation that says "do not write programs that rely on the order given here". At least the order in which the codes are given in the documentation should work.

Sometimes it is obvious that the order of the codes can give problems like the coordinates x, y, z of a point; but other times it is not so obvious.

Anyways, thanks for the input and this fix.