ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Layer Class / QueryExtent Method
(Optional) -true- computes extent of the layer using largest symbol size.
-false- returns the underlying FeatureClass' full extent.
(default value = false)

In This Topic
    QueryExtent Method
    In This Topic
    Returns extent of the layer optionally taking symbol size in account. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function QueryExtent( _
       Optional ByVal includeSymbolSize As Boolean _
    ) As Envelope
    public Envelope QueryExtent( 
       bool includeSymbolSize
    )

    Parameters

    includeSymbolSize
    (Optional) -true- computes extent of the layer using largest symbol size.
    -false- returns the underlying FeatureClass' full extent.
    (default value = false)

    Return Value

    An envelope that covers all features of the layer.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    If you want to get extent to zoom to the layer's extent but do not want to see features cut off on edges, you should use
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also