AutoCAD.Net/C#.Net QQ群:193522571 标注对象Dimension中的DimensionText和Measurement的区别

当标注文字被修改过时,

我们应该读取DimensionText属性,

如果没有被修改过则应读取Measurement。

没有被修改的标注其DimensionText为空。

if (ObjectId.ObjectClass.IsDerivedFrom(RXObject.GetClass(typeof(Dimension))))
{
var ent = (Dimension)trans.GetObject(ObjectId, OpenMode.ForRead);
Text = ent.DimensionText == "" ? ent.Measurement.ToString() : ent.DimensionText;
HasText = true;
}

原文地址:https://www.cnblogs.com/swtool/p/14968612.html