ArcGIS Pro 3.7 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 Function GetFilters() As List(Of FilterDefinition)
    public List<FilterDefinition> GetFilters()

    Return Value

    Remarks
    If there are no filters an empty list is returned
    Example
    Create a Default Filter and Get Filter Count
    {
      // Note: call within QueuedTask.Run()
      {
        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
    {
      // Note: call within QueuedTask.Run()
      {
        //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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also