Summary
Creates a scene layer from a scene layer package (.slpk) or scene service.
Usage
The properties and methods available on a scene layer depend on the scene layer type. For example, 3D object and point scene layers with an associated feature layer have additional capabilities as the associated feature layer acts as the system of record. This includes using the scene layer as input to geoprocessing tools. Integrated mesh scene service layers have no system of record and it is a display cache only. Scene layers referencing a scene layer package do not have a system of record as it is a cache only, and regardless of scene layer type, they cannot be used as input to geoprocessing tools.
Point cloud scene layers are not supported in this tool.
The temporary scene layer can be saved as a layer file using the Save To Layer File tool.
To create a point or 3D object scene layer with an associated feature layer, share the web layer or web scene to a portal.
For more information on scene layers, see What is a scene layer?
Syntax
MakeSceneLayer_management (in_dataset, out_layer)
Parameter | Explanation | Data Type |
in_dataset | The input scene layer package (.slpk) or scene service from which the new scene layer will be created. | Scene Layer; File |
out_layer | The name of the scene layer to be created. | Scene Layer |
Code sample
The following Python window script demonstrates how to use the MakeSceneLayer function with a scene layer package as input.
import arcpy
arcpy.management.MakeSceneLayer(r"c:\temp\buildings.slpk", "buildings_Layer")
The following Python window script demonstrates how to use the MakeSceneLayer function with a scene service as input.
import arcpy
arcpy.management.MakeSceneLayer("https://MyServer.com/server/rest/services/Hosted/City_WSL1/SceneServer/layers/0",
"City_Layer")
The following stand-alone script demonstrates how to use the MakeSceneLayer function to create a layer that can be used by the GetCount tool.
# Name: GetSceneLayerCount.py
# Description: Gets the number of features from a scene service
# Import system modules
import arcpy
out_layer = 'Hamburg_Buildings'
# Make a layer from a scene service
arcpy.MakeSceneLayer_management('http://scene.arcgis.com/arcgis/rest/services/Hosted/Building_Hamburg/SceneServer/layers/0',
out_layer)
print("Created Scene Layer")
# Get the number of features from the scene service
result = arcpy.GetCount_management(out_layer)
print('{} has {} records'.format(out_layer, result[0]))
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes