TheSwamp
Code Red => .NET => Topic started by: latour_g on August 08, 2013, 09:35:30 AM
-
Hi,
I have to set the angle for blocks attributes but I don't know how to set it correctly when the UCS is modify.
Like that, the position of the attribute is correct but the angle is incorrect.
AttributeReference att = (AttributeReference)tr.GetObject(id, OpenMode.ForWrite);
att.Rotation = rotAngle;
Like that, the angle of the attrbiute is correct but the position is incorrect.
AttributeReference att = (AttributeReference)tr.GetObject(id, OpenMode.ForWrite);
att.Rotation = rotAngle;
att.TransformBy(doc.Editor.CurrentUserCoordinateSystem);
-
Try something like this using BlockTransform matrix:
attRef.Position = attDef.Position.TransformBy(bref.BlockTransform);
attRef.Tag = attDef.Tag;
attRef.TextString = attDef.TextString;
attRef.AdjustAlignment(db);