ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Core Namespace / IItemFactory Interface / GetDefinition Method
The item to check.

In This Topic
    GetDefinition Method (IItemFactory)
    In This Topic
    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
    Definition GetDefinition( 
       Item item
    )
    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

    ArcGIS Pro version: 3 or higher.
    See Also