ArcGIS Pro 2.7 API Reference Guide
RemoveItems Method

ArcGIS.Desktop.Core Namespace > Project Class : RemoveItems Method
The collection of IProjectItem to be removed
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 10, Windows 8.1

See Also

Reference

Project Class
Project Members