ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Core.Events Namespace / GPExecuteToolEvent Class
Members Example

In This Topic
    GPExecuteToolEvent Class
    In This Topic
    Occurs when a Geoprocessing Tool is executed
    Object Model
    GPExecuteToolEvent ClassSubscriptionToken ClassSubscriptionToken Class
    Syntax
    Example
    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"));
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Events.EventBase
          ArcGIS.Core.Events.CompositePresentationEvent<TPayload>
             ArcGIS.Desktop.Core.Events.GPExecuteToolEvent

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also