ocument)acadApp.GetInterfaceObject(progid);Р25: dbxDoc.Open(@"F:\Test.dwg");Р26: foreach (dbx.AcadEntity entity in dbxDoc.ModelSpace)Р27: {Р28: if (entity.EntityName == "AcDbBlockReference")//判断实体是否是块参照Р29: {Р30: dbx.AcadBlockReference blkRef; Р31: blkRef = (dbx.AcadBlockReference)entity; //将是块参照的实体强制转换为块参照类型Р32: object[] atts = (object[])blkRef.GetAttributes();//获取块参照中的属性(为对象类型)Р33: for (int i = 0; i < atts.Length; i++) //遍历块参照属性Р34: {Р35: dbx.AcadAttributeReference att;Р36: att = (dbx.AcadAttributeReference)atts