ArcGIS Pro 2.9 API Reference Guide
GetDefinition Method (ItemFactory)

ArcGIS.Desktop.Core Namespace > ItemFactory Class : GetDefinition Method
The item to check.
Gets the ArcGIS.Core.Data.Definition associated with the item corresponding to Item.Path. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public Definition GetDefinition( 
   Item item
)
Public Function GetDefinition( _
   ByVal item As Item _
) As Definition

Parameters

item
The item to check.

Return Value

A specific ArcGIS.Core.Data.Definition (e.g., ArcGIS.Core.Data.FeatureClassDefinition) associated with the item. A NotSupportedException will be thrown if the definition cannot be determined for the item. Use CanGetDefinition to determine if the definition can be retrieved before calling this.
Exceptions
ExceptionDescription
A geodatabase-related exception has occurred.
This method or property must be called within the lambda passed to QueuedTask.Run
The definition cannot be determined for this item. Check CanGetDefinition prior to calling this.
item is null.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

ItemFactory Class
ItemFactory Members