I am attempting to migrate a Pro AddIn from 2x to 3x and ran into an issue.
My addin uses the MapSelectionChangedEvent to capture selected features in order to obtain wkts associated with these features. This is the code used to subscribe the selection event:
ArcGIS.Desktop.Mapping.Events.MapSelectionChangedEvent.Subscribe(OnSelectionChanged);
private async void OnSelectionChanged(ArcGIS.Desktop.Mapping.Events.MapSelectionChangedEventArgs args)
{
if (args == null)
return;
var sel = args.Selection.ToDictionary();
// remove old wkts
components.Clear();
// get the first BasicFeatureLayer
//var member = sel.Keys.FirstOrDefault(mm => mm is BasicFeatureLayer);
foreach (var member in sel.Keys)
{
********
These code work fine in 2x but after migration to 3x the OnSelectionChanged method does not run even after selections were made on the map.
The migration guide did not mention any changes to events. The Migration Status Report does not mention anything useful.