ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureSceneLayer Class
Members Example

In This Topic
    FeatureSceneLayer Class
    In This Topic
    FeatureSceneLayers currently support the I3S Point and 3D Object layer types. Points must be based off 3D point data and 3D Objects must be based off multipatches.
    Object Model
    FeatureSceneLayer ClassDefinitionQuery ClassLayer ClassCIMDataConnection ClassTimeExtent ClassCIMBaseLayer ClassFeatureClass ClassCIMRenderer ClassSelection ClassSpatialReference ClassTimeParameters ClassMap ClassILayerContainer InterfaceEnvelope ClassRowCursor ClassSelection ClassDefinitionQuery Class
    Create a Scene Layer
    var sceneLayerUrl = @"";
    //portal items also ok as long as the portal is the current active portal...
    //var sceneLayerUrl = @"";
    await QueuedTask.Run(() =>
      //Create with initial visibility set to false. Add to current scene
      var createparams = new LayerCreationParams(new Uri(sceneLayerUrl, UriKind.Absolute))
        IsVisible = false
      //cast to specific type of scene layer being created - in this case FeatureSceneLayer
      var sceneLayer = LayerFactory.Instance.CreateLayer<Layer>(
               createparams, MapView.Active.Map) as FeatureSceneLayer;
      //or...specify the cast directly
      var sceneLayer2 = LayerFactory.Instance.CreateLayer<FeatureSceneLayer>(
               createparams, MapView.Active.Map);
      //ditto for BuildingSceneLayer, PointCloudSceneLayer, IntegratedMeshSceneLayer
    Name of FeatureSceneLayer
    var featSceneLayer = MapView.Active.Map.GetLayersAsFlattenedList()
    var scenelayerName = featSceneLayer?.Name;
    Use MapView Selection SelectFeaturesEx or GetFeaturesEx
    //var featSceneLayer = ...;
    var sname = featSceneLayer.Name;
    await QueuedTask.Run(() =>
      //Select all features within the current map view
      var sz = MapView.Active.GetViewSize();
      var c_ll = new Coordinate2D(0, 0);
      var c_ur = new Coordinate2D(sz.Width, sz.Height);
      //Use screen coordinates for 3D selection on MapView
      var env = EnvelopeBuilderEx.CreateEnvelope(c_ll, c_ur);
      //HasAssociatedFeatureService does not matter for SelectFeaturesEx
      //or GetFeaturesEx
      var result = MapView.Active.SelectFeaturesEx(env);
      //var result = MapView.Active.GetFeaturesEx(env);
      //The list of object ids from SelectFeaturesEx
      //At 2.x - var oids1 = result.Where(kvp => kvp.Key.Name == sname).First().Value;
      var oids1 = result.ToDictionary().Where(kvp => kvp.Key.Name == sname).First().Value;
      //TODO - use the object ids
    Inheritance Hierarchy



    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also