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

    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
    {
      // 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;
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also