ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Core Namespace / Project Class / RemoveItems Method
The collection of IProjectItem to be removed

In This Topic
    RemoveItems Method
    In This Topic
    Removes project items from the current project. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public bool RemoveItems( 
       IEnumerable<IProjectItem> items
    )
    Public Function RemoveItems( _
       ByVal items As IEnumerable(Of IProjectItem) _
    ) As Boolean

    Parameters

    items
    The collection of IProjectItem to be removed

    Return Value

    Returns a boolean indicating the operation's success.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    For items that are referenced by the project such as a folder, the folder connection is removed from the project but the folder continues to exist on the local disk or network. However, for items stored in the project such as maps and layouts, the map or layout definition is deleted when the project item is removed.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also