ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / BuildingSceneLayer Class / GetFilters Method
Example

In This Topic
    GetFilters Method (BuildingSceneLayer)
    In This Topic
    Returns a list of defined filters. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public List<FilterDefinition> GetFilters()
    Public Function GetFilters() As List(Of FilterDefinition)

    Return Value

    Remarks
    If there are no filters an empty list is returned
    Example
    Create a Default Filter and Get Filter Count
    //Must be called on the MCT
    //Creates a default filter on the building scene
    //var bsl = ...;
    var filter1 = bsl.CreateDefaultFilter();
    var values = filter1.FilterBlockDefinitions[0].SelectedValues;
    //values will be a single value for the type
    //"CreatedPhase", value "New Construction"
    
    //There will be at least one filter after "CreateDefaultFilter()" call
    var filtersCount = bsl.GetFilters().Count;
    
    Get all the Filters that Contain WireFrame Blocks
    //var bsl = ...;
    //Note: wire_frame_filters can be null in this example
    var wire_frame_filters = bsl.GetFilters().Where(
      f => f.FilterBlockDefinitions.Any(
        fb => fb.FilterBlockMode == Object3DRenderingMode.Wireframe));
    //substitute Object3DRenderingMode.None to get blocks with a solid mode (default)
    //and...
    //fb.FilterBlockMode == Object3DRenderingMode.Wireframe &&
    //fb.FilterBlockMode == Object3DRenderingMode.None
    //for blocks with both
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also