用C#编写的arcgis addin如何用代码更新 编辑器中的Attribute Window?

问题出现原因:自定义窗口中有按钮实现类似遍历的功能,代码已实现缩放到需要的图形,属性表中也已高亮显示,但编辑器中的AttributeWindow不能联动变化。
代码:
IEnvelope pViewEnvelope = pRelationGeo.Envelope;
pViewEnvelope.Expand(3, 3, true);

IFeatureSelection pFeatureSelection = TraversingFeaLay as IFeatureSelection;
pFeatureSelection.SelectFeatures(new QueryFilterClass() { WhereClause = TraversingFeaLay.FeatureClass.OIDFieldName + " = " + FeaOIDs[Current] }, esriSelectionResultEnum.esriSelectionResultNew, true);

需要如何修改或增加代码,才能实现编辑器中AttributeWindow的联动?
AttributeTable不能联动.PNG
已邀请:

jiushidt - AE使用者

赞同来自:

自主触发一下featurelayetselectionchanged事件试一下

llc3s

赞同来自:

做过类似的事情,跌跌撞撞,试验了很多。下面的代码可以实现,
private IMap pMap = null;
private IActiveView pAv = null;
private ISelectionEvents pSelectionEvents;
 
pMap = ArcMap.Document.FocusMap;
pAv = pMap as IActiveView;
pSelectionEvents = pMap as ISelectionEvents;
 
pMap.ClearSelection();
pMap.SelectFeature(frmInscremetSet.pftlyr, pFeature);
pSelectionEvents.SelectionChanged();                
pAv.PartialRefresh(esriViewDrawPhase.esriViewAll, null, null);

要回复问题请先登录注册