【AE接口散记】

*在使用Extending ArcObjects开发方法时,一些变量的获得方法。

IActiveView

pActiveView = (m_application.Document as IMxDocument).ActivatedView;

 

IMap

pMap = (m_application.Document as IMxDocument).FocusMap;

 

绘制函数的调出方法:

(IActiveView as IActiveViewEvents_Event).AfterDraw += new IActiveViewEvents_AfterDrawEventHandler(Command1_AfterDraw);

 

 

 

*IFeature要素修改其属性值后必须IFeature.Store()才能在数据库中存储相应修改

 

*ITableSort对ISelectionSet中的数据按照属性进行排序(ISelectionSet可以通过IFeatureClass.Select()方法获得)

1 string strSortField = "CARID,TIME";//设置排序字段,这里意味着先利用CARID排序,然后在其结果基础上利用TIME排序
2 
3 ITableSort pTableSort = new TableSort();
4 pTableSort.SelectionSet = readSelectionSet;//排序数据源输入
5 pTableSort.Fields = strSortField;//排序字段源输入
6 pTableSort.set_Ascending(strSortField, true);//升序排列
7 pTableSort.Sort(null);//执行排序过程
8 
9 IFeatureCursor readFeaCursor = pTableSort.Rows as IFeatureCursor;//提取排序后数据

 

posted @ 2015-04-10 16:25  坐听竹雨落轻轻  阅读(256)  评论(0编辑  收藏  举报