ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / BuildingSceneLayer Class / CreateDefaultFilter Method
Example

In This Topic
    CreateDefaultFilter Method
    In This Topic
    Creates a filter definition with default values. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public FilterDefinition CreateDefaultFilter()
    Public Function CreateDefaultFilter() As FilterDefinition

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    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;
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also