vba如何取得选中面的属性表字段内容和质心坐标?

下面是选中图层中一个面的代码,我想取得这个面的“nl”字段值,还有面的质心坐标,要怎么写?
选择代码如下:
Dim mxDoc As IMxDocument '地图文档
Dim lyr As IFeatureLayer '要素层
Dim sel As IFeatureSelection '选择集
Dim filter As IQueryFilter '查询过滤器
Dim selEvents As ISelectionEvents '???
Set mxDoc = Application.Document '获取当前地图文档
Set lyr = FindLayer(mxDoc.FocusMap, "ouput") '调用FindLayer函数查找图层
Set sel = lyr '将找到的图层设为选择集
Set filter = New QueryFilter
filter.WhereClause = "CLDX ='00008110'" '设置where子句
sel.SelectFeatures filter, esriSelectionResultNew, False '选中满足条件的要素
mxDoc.ActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing '绘出选中的要素
Set selEvents = mxDoc.FocusMap '???
selEvents.SelectionChanged '通知系统选择已经改变了
已邀请:

徐珂 - ArcGIS for Desktop

赞同来自:

获取质心坐标,如果不使用代码的话,可以使用GP工具Add Geometry Attribute(添加几何属性),详见:http://desktop.arcgis.com/zh-c ... s.htm

云卷云舒

赞同来自:

主要是代码如何查属性值

要回复问题请先登录注册