ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / BuildingSceneLayer Class / HasFilter Method
The filter id to check
Example

In This Topic
    HasFilter Method
    In This Topic
    Determines whether a filter exists with the given filter ID.
    Syntax
    public bool HasFilter( 
       string filterID
    )
    Public Function HasFilter( _
       ByVal filterID As String _
    ) As Boolean

    Parameters

    filterID
    The filter id to check

    Return Value

    Example
    Set and Clear Active Filter for BuildingSceneLayer
    //Must be called on the MCT
    //Note: Use HasFilter to check if a given filter id exists in the layer
    //var bsl = ...;
    if (bsl.HasFilter(filter1.ID))
      bsl.SetActiveFilter(filter1.ID);
    var activeFilter = bsl.GetActiveFilter();
    
    //Clear the active filter
    bsl.ClearActiveFilter();
    
    Remove BuildingSceneLayer Filter
    //var bsl = ...;
    //Note: Use HasFilter to check if a given filter id exists in the layer
    //Must be called on the MCT
    if (bsl.HasFilter(filter1.ID))
      bsl.RemoveFilter(filter1.ID);
    //Or remove all filters
    bsl.RemoveAllFilters();
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also