AutoCAD开发8---获取块属性(C#)

时间:2019-12-12 14:39:29   收藏:0   阅读:402
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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!