ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ImageServiceLayer Class / SetActiveDefinitionQuery Method
The name of the query definition to set as active.

In This Topic
    SetActiveDefinitionQuery Method (ImageServiceLayer)
    In This Topic
    Sets the definition query matching the specified queryName to be the active definition query. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void SetActiveDefinitionQuery( 
       string queryName
    )
    Public Sub SetActiveDefinitionQuery( _
       ByVal queryName As String _
    ) 

    Parameters

    queryName
    The name of the query definition to set as active.
    Exceptions
    ExceptionDescription
    There are no query definitions.
    The specified queryName doesn't match any items in the query definition collection.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    If the queryName is null, then the active query definition is removed and the layer no longer has an active definition query.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also