ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / BasicFeatureLayer Class / SearchEx Method
A query filter
A time filter
A range filter
A floor filter filter only works if the layer has a defined floor field.
If set to true, all the entries in RowCursor will reference the most current row returned by Current. To ensure all the entries in RowCursor remain unique, set useRecyclingCursor to false. The default is true.

In This Topic
    SearchEx Method (BasicFeatureLayer)
    In This Topic
    Executes a query to the underlying data source and returns rows matching the search criteria. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function SearchEx( _
       Optional ByVal queryFilter As QueryFilter, _
       Optional ByVal time As TimeRange, _
       Optional ByVal range As RangeExtent, _
       Optional ByVal floor As CIMFloorFilterSettings, _
       Optional ByVal useRecyclingCursor As Boolean _
    ) As RowCursor

    Parameters

    queryFilter
    A query filter
    time
    A time filter
    range
    A range filter
    floor
    A floor filter filter only works if the layer has a defined floor field.
    useRecyclingCursor
    If set to true, all the entries in RowCursor will reference the most current row returned by Current. To ensure all the entries in RowCursor remain unique, set useRecyclingCursor to false. The default is true.

    Return Value

    A RowCursor allows access to the matched rows.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks

    If there is a definition query set on the MapMember, the SearchEx() method will automatically work on the subset of rows in the MapMember that meet the definition criteria. You specify an additional query that will be applied after the MapMember's definition query by passing valid QueryFilter object for the QueryFilter parameter.
    If the MapMember has any joins, this SearchEx() method takes that into account.
    You can use the cursor returned by SearchEx to update rows.

    To ensure maximum robustness, callers should explicitly dispose of the returned ArcGIS.Core.Data.RowCursor in either a using statement or a finally block.

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.6 or higher.
    See Also