How to use Geoprocessing public event
ArcGIS.Desktop.Core.Events.GPExecuteToolEvent.Subscribe(e =>
{
string id = e.ID; // Same as history ID
if (e.IsStarting == false) // Execute completed
_ = e.GPResult.ReturnValue;
System.Windows.MessageBox.Show("event triggered.");
});
await Geoprocessing.ExecuteToolAsync("management.GetCount", Geoprocessing.MakeValueArray(@"c:\shape_file.shp"));
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.1 or higher.