码迷,mamicode.com
首页 > 其他好文 > 详细

AE,按照属性值关系选择要素

时间:2015-01-17 15:02:00      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

if(axMapControl2.LayerCount<=0)
{
MessageBox.Show("请加载图层后使用该功能","系统提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
}
else
{
ILayer pLayer = axMapControl2.get_Layer(0);
IFeatureLayer pFeatureLayer = pLayer as IFeatureLayer;
IFeatureSelection pFeatureSelection = (IFeatureSelection)pFeatureLayer;//要素层转为要素选择
IQueryFilter pQueryFilter = new QueryFilter();//(新建查询过滤器)
pQueryFilter.WhereClause = "TBMJ <1500";
pFeatureSelection.SelectFeatures(pQueryFilter, esriSelectionResultEnum.esriSelectionResultNew, false);
this.axMapControl2.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null);
}

AE,按照属性值关系选择要素

标签:

原文地址:http://www.cnblogs.com/xianerwonder/p/4230405.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!