public object GetValueByAttributeName(dbx.AcadBlockReference blkRef,string AttributeName) { object[] Atts=(object[])blkRef.GetAttributes(); object attValue=null; for (int i=0;i { dbx.AcadAttributeReference attRef; attRef=(dbx.AcadAttributeReference)Atts[i]; if (attRef.TagString==AttributeName) { attValue= attRef.TextString ; break; } }//end of for i return attValue; }// end of function
转自:http://www.programfan.com/article/3161.html
原文地址:https://www.cnblogs.com/jordonin/p/12028274.html
时间: 2024-10-13 15:39:12