ArcGIS Pro 2.6 API Reference Guide
RemoveItem Method (Project)

ArcGIS.Desktop.Core Namespace > Project Class : RemoveItem Method
The IProjectItem to be removed
Removes the project item from the current project. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public bool RemoveItem( 
   IProjectItem item
)
Public Function RemoveItem( _
   ByVal item As IProjectItem _
) As Boolean

Parameters

item
The 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, Windows 7

See Also

Reference

Project Class
Project Members