ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data Namespace / Database Class / CalculateExtent Method
The extent of the feature class that needs to be calculated.

In This Topic
    CalculateExtent Method
    In This Topic
    Calculates the extent for the spatial single table or query layer specified by featureClass. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void CalculateExtent( 
       FeatureClass featureClass
    )
    Public Sub CalculateExtent( _
       ByVal featureClass As FeatureClass _
    ) 

    Parameters

    featureClass
    The extent of the feature class that needs to be calculated.
    Exceptions
    ExceptionDescription
    featureClass is null.
    featureClass was not originally opened from a Database data store. For example, it was opened from a file or enterprise geodatabase data store instead.
    A database-related exception has occurred.
    Remarks
    When a spatial table (i.e., FeatureClass) or its corresponding definition (i.e., FeatureClassDefinition) is first opened, the FeatureClass object's extent is set to the domain of its spatial reference (i.e., the XMin, YMin, XMax, YMax of the spatial reference's extent). The reason is that depending on the size of a database table, it can be expensive to calculate all the geometries to accurately find the envelope. Thus, if clients truly want to find the accurate extent of a specific feature class, they can do so by calling this method.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also