ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / ApplicationOptions Class / GeoprocessingOptions Property
Example

In This Topic
    GeoprocessingOptions Property
    In This Topic
    Gets the available application geoprocessing options.
    Syntax
    Public Shared ReadOnly Property GeoprocessingOptions As GeoprocessingOptions
    public static GeoprocessingOptions GeoprocessingOptions {get;}
    Example
    Get GeoprocessingOptions
    {
      //These options are for behavior of interactive GP tools _only_.
    
      var overwrite_gp = ApplicationOptions.GeoprocessingOptions.OverwriteExistingDatasets;
      var remove_gp = ApplicationOptions.GeoprocessingOptions.RemoveOverwrittenLayers;
      var addoutput_gp = ApplicationOptions.GeoprocessingOptions.AddOutputDatasetsToOpenMap;
      var history_gp = ApplicationOptions.GeoprocessingOptions.WriteGPOperationsToHistory;
    }
    Set GeoprocessingOptions
    {
      //Note: changing these options modifies behavior of interactive GP tools _only_.
      //Use the ArcGIS.Desktop.Core.Geoprocessing.GPExecuteToolFlags enum parameter
      //to modify the behavior of Geoprocessing.ExecuteToolAsync(...)
    
      //Note: Needs QueuedTask to run
      {
        ApplicationOptions.GeoprocessingOptions.SetOverwriteExistingDatasets(true);
        ApplicationOptions.GeoprocessingOptions.SetRemoveOverwrittenLayers(false);
        ApplicationOptions.GeoprocessingOptions.SetAddOutputDatasetsToOpenMap(true);
        ApplicationOptions.GeoprocessingOptions.SetWriteGPOperationsToHistory(false);
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also