Public Shared ReadOnly Property GeoprocessingOptions As GeoprocessingOptions
public static GeoprocessingOptions GeoprocessingOptions {get;}
Public Shared ReadOnly Property GeoprocessingOptions As GeoprocessingOptions
public static GeoprocessingOptions GeoprocessingOptions {get;}
{
//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;
}
{
//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);
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)