ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapFactory Class / CreateScene Method
The name of the map
A Uri (optional)
ArcGIS.Core.CIM.MapViewingMode (Optional) Map's default viewing mode. (default value = MapViewingMode.SceneLocal)
Basemap (Optional) Map's basemap which can be the one that is set as the default for the project or one of the ArcGIS Online basemaps. If you want create a map without basemap, set it to Basemap.None. (default value = Basemap.ProjectDefault)
Example

In This Topic
    CreateScene Method (MapFactory)
    In This Topic
    Creates a map of type MapType.Scene ArcGIS.Core.CIM.MapType with a specified ground elevation source. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function CreateScene( _
       ByVal name As String, _
       Optional ByVal groundElevationSourceUri As Uri, _
       Optional ByVal defaultViewingMode As MapViewingMode, _
       Optional ByVal basemap As Basemap _
    ) As Map

    Parameters

    name
    The name of the map
    groundElevationSourceUri
    A Uri (optional)
    defaultViewingMode
    ArcGIS.Core.CIM.MapViewingMode (Optional) Map's default viewing mode. (default value = MapViewingMode.SceneLocal)
    basemap
    Basemap (Optional) Map's basemap which can be the one that is set as the default for the project or one of the ArcGIS Online basemaps. If you want create a map without basemap, set it to Basemap.None. (default value = Basemap.ProjectDefault)

    Return Value

    A map.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    A groundElevationSourceUri value of null (default) will create a scene without a ground elevation source. To open a map, use ProApp.Panes.CreateMapPaneAsync method.
    Example
    Create a scene with a ground surface layer
    // wrap in QueuedTask.Run
    var scene = MapFactory.Instance.CreateScene("My scene", groundSourceUri, MapViewingMode.SceneGlobal);
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also