IEditEvents::OnSelectionChanged event is not fired with a programmatic feature selection by an attribute change of selection.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM031253
已提交
January 11, 2008
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
编程语言
VBA
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
No Public Explanation
解决办法
The client should be aware that it is necessary to call the SelectionChanged() method on the ISelectionEvents interface of the Map in order to force it to fire the event to the Editor (and other clients). Additionally it is not necessary to call the IFeatureSelection::SelectionChanged() method on the layer, as this is called internally by IFeatureSelection::SelectFeatures()Code was updated in the MXD at the test data path and saved as OnSelectionChanged_CORRECTED.mxdUpdated Code Dim pMapSelectionEvents As ISelectionEvents Set pMapSelectionEvents = pMap ... '''''''''''''''''''''''''''''''''''''''''''''' 'Make the query filter Set pQueryFilt = New QueryFilter pQueryFilt.WhereClause = "Sub_region = 'S Atl'" 'Perform the selection and refresh the view Set pFeatSel = pEditLayers.CurrentLayer pFeatSel.SelectFeatures pQueryFilt, esriSelectionResultNew, False pMapSelectionEvents.SelectionChanged Debug.Print m_pEditor.SelectionCount '''''''''''''''''''''''''''''''''''''''''''''' 'Refresh pMxDoc.ActiveView.PartialRefresh esriViewGeography, Nothing, Nothing