C# CAD开发 如何获取快属性
AcadBlockReference Blockrefrece = (AcadBlockReference)acadObj;object[] Blockobject = Blockrefrece.GetAttributes();
AcadAttribute abtt = Blockobject. as AcadAttribute;//错误
string str1 = abtt.TagString;如何将 object[]属性集合 转化成AcadAttribute[],不能强制转化啊
没人知道嘛 。。。。。 DBObject dbObj = ctrans.GetObject(peRes.ObjectId, OpenMode.ForRead);
if (dbObj is BlockReference)
{
BlockReference bRef = (BlockReference)dbObj;
if (bRef.AttributeCollection != null && bRef.AttributeCollection.Count > 0)
{
foreach (ObjectId attId in bRef.AttributeCollection)
{
DBObject tObj = ctrans.GetObject(attId, OpenMode.ForRead);
if (tObj is AttributeReference)
{
AttributeReference attRef = (AttributeReference)tObj;
页:
[1]