编辑已关闭图形上的属性
这可能有点棘手...或者不是,但我无法找到解决方案我有一个在封闭绘图上编辑属性的命令。它只更改内容,它可以很好地更改内容,但不会在正确的理由下进行调整。它保留了实际的插入点,因此它是偏移的。任何想法?谢谢!BlockTableRecords bDef=(BlockTableRecords)tr.GetObject(blkTable,OpenMode.ForWrite, false);。ObjectIdCollection ObjectColl=bDef.GetBlockReferenceIds(false, true);。
。
foreach(ObjectId中的ObjectId)。
{。
区块参考br=(区块参考)tr.GetObject(ObjId,OpenMode.ForWrite, true);。
如果(br.AttributeCollection.Count>0)。
{。
foreach(br.AttributeCollection中的ObjectId id)。
{。
属性引用att=tr.GetObject(id,OpenMode.ForWrite);。
如果(attValLst.Contains(att.Tag.ToUpper ()))。
{。
att.TextString=attValueLst,ToString();。
}。
}。
br.RecordGraphicsModified(真);。
}。
}。
**** Hidden Message ***** 我假设“封闭图形”是指开放端数据库,在其中更新某些块参考的属性。
这是一个众所周知的问题,已经在AutoCAD论坛中讨论过,可能在本论坛中也讨论过几次。比如这样:
https://forums . Autodesk . com/t5/net/changed-attribute-text-in-sidedb-does-not-re-align-when/m-p/8665044
HTH
你完全正确,我需要使用HostApplicationServices。工作数据库<br>非常感谢!
页:
[1]