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

In This Topic
    BuildingSceneLayer Class
    In This Topic
    Class to represent the 3D model aspect of Building Information Modeling (BIM).
    Object Model
    BuildingSceneLayer ClassFilterDefinition ClassLayer ClassFilterDefinition ClassCIMDataConnection ClassTimeExtent ClassCIMBaseLayer ClassElevationTypeDefinition ClassFilterDefinition ClassSpatialReference ClassTimeParameters ClassMap ClassILayerContainer InterfaceEnvelope Class
    Syntax
    Remarks
    BuildingSceneLayers are typically derived from BIM data extracted from Autodesk revit files.
    BuildingSceneLayers are a CompositeLayer. They contain two top-level child layers:
    o A FeatureSceneLayer providing an "Overview" (think of it as a simplified rendering of the building exterior).
    o A BuildingDisciplineSceneLayer providing the "Full Model" which includes all of the building disciplines extracted from the original BIM.
    Example
    Enumerate the Discipline Layers from a Building SceneLayer
    public void QueryBuildingSceneLayer()
    {
      var bldgLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<BuildingSceneLayer>().First();
      var disciplines = new Dictionary<string, BuildingDisciplineSceneLayer>();
      //A Building layer has two children - Overview and FullModel
      //Overview is a FeatureSceneLayer
      //Full Model is a BuildingDisciplineSceneLayer that contains the disciplines
      
      var fullModel = bldgLayer.FindLayers("Full Model").First() 
                                     as BuildingDisciplineSceneLayer;
      CollectDisciplineLayers(fullModel, disciplines);
      
    }
    
    internal void CollectDisciplineLayers(BuildingDisciplineSceneLayer disciplineLayer,
      Dictionary<string, BuildingDisciplineSceneLayer> disciplines)
    {
      //collect information on the disciplines
      var name = disciplineLayer.Name;
      //At 2.x - var layerType =
      //      ((ISceneLayerInfo)disciplineLayer).SceneServiceLayerType.ToString();
    
      var discipline = disciplineLayer.GetDiscipline();
      //etc
      //TODO - use collected information
    
      disciplines.Add(discipline, disciplineLayer);
    
      //Discipline layers are composite layers too
      foreach (var childDiscipline in disciplineLayer.Layers
                          .OfType<BuildingDisciplineSceneLayer>())
      {
        //Discipline layers can also contain FeatureSceneLayers that render the
        //individual full model contents
        var content_names = string.Join(", ", childDiscipline.Layers
             .OfType<FeatureSceneLayer>().Select(fl => fl.Name));
        CollectDisciplineLayers(childDiscipline, disciplines);
      }
    }
    
    Name of BuildingSceneLayer
    var bsl = MapView.Active.Map.GetLayersAsFlattenedList()
                      .OfType<BuildingSceneLayer>().FirstOrDefault();
    var scenelayerName = bsl.Name;
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
          ArcGIS.Desktop.Mapping.MapMember
             ArcGIS.Desktop.Mapping.Layer
                ArcGIS.Desktop.Mapping.CompositeLayer
                   ArcGIS.Desktop.Mapping.BuildingSceneLayer

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also