ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / GeoprocessingOptions Class / SetRemoveOverwrittenLayers Method
Boolean indicating if overwritten layers in a map are to be removed.

In This Topic
    SetRemoveOverwrittenLayers Method
    In This Topic
    Sets whether layers in a map are removed if their source datasets are deleted by a geoprocessing tool that overwrites output. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Sub SetRemoveOverwrittenLayers( _
       ByVal removeOverwrittenLayers As Boolean _
    ) 
    public void SetRemoveOverwrittenLayers( 
       bool removeOverwrittenLayers
    )

    Parameters

    removeOverwrittenLayers
    Boolean indicating if overwritten layers in a map are to be removed.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Note: see ArcGIS.Desktop.Core.Geoprocessing.GPExecuteToolFlags for available options for modifying behavior of ArcGIS.Desktop.Core.Geoprocessing.Geoprocessing.ExecuteToolAsync. Changing these parameters modifies behavior of interactive GP tools
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also