ArcGIS Pro 2.7 API Reference Guide
GetItems<T> Method (Project)

ArcGIS.Desktop.Core Namespace > Project Class : GetItems<T> Method
The ProjectItem type that is used to filter the complete list of project items
Gets a collection of a specific type of items within the project
Syntax
public IEnumerable<T> GetItems<T>()
where T: Item
Public Function GetItems(Of T As Item)() As IEnumerable(Of T)

Type Parameters

T
The ProjectItem type that is used to filter the complete list of project items

Return Value

Remarks

To return all the databases in the project, for example, provide the appropriate project item type. For example, see the GDBProjectItem class in the ArcGIS.Desktop.Catalog namespace.

If a type is not provided, all items that have been added to the current project will be returned, including the maps, layouts, toolboxes, default geodatabase, the home folder connection, and so on. A folder connection is a project item; subfolders and files accessed using a folder connection are items but are not project items because they have not been added to a project.

Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Project Class
Project Members