laptop and a wrench

Bug

IEditEvents::OnSelectionChanged event is not fired with a programmatic feature selection by an attribute change of selection.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM031253
SubmittedJanuary 11, 2008
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Program languageVBA
StatusWill Not Be Addressed

Additional Information

No Public Explanation

Workaround

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

Steps to Reproduce

Bug ID: NIM031253

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options