|
double scale =2; //需要放大 or 缩小的倍数
BlockReference br = ent as BlockReference;
// 1、改属性块比例
Matrix3d sMtx = Matrix3d.Scaling(scale, br.Position);
br.TransformBy(sMtx);
//
// 2、该属性块值 foreach (ObjectId adId in br.AttributeCollection)
{
AttributeReference attRef = myTrans.GetObject(adId, OpenMode.ForWrite, false) as AttributeReference;
if (attRef.Tag == "tag")
{
attRef.TextString ="new value"
}
} |
|