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

In This Topic
    GetDataset Method (IItemFactory)
    In This Topic
    Gets the ArcGIS.Core.Data.Dataset associated with the item corresponding to Item.Path. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Dataset GetDataset( 
       Item item
    )
    Function GetDataset( _
       ByVal item As Item _
    ) As Dataset

    Parameters

    item
    The item to check.

    Return Value

    A specific ArcGIS.Core.Data.Dataset (e.g., ArcGIS.Core.Data.FeatureClass) associated with the item. A NotSupportedException will be thrown if the dataset cannot be determined for the item. Use CanGetDataset to determine if the dataset 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 dataset cannot be determined for this item. Check CanGetDataset prior to calling this.
    item is null.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also