Create Building Scene Layer Package (Data Management)

Summary

Creates a scene layer package (.slpk file) from a building layer input.

Usage

  • To use Revit data as input, you must first add the Revit data to an active global or local scene as a building layer. The building layer, or layer file (.lyrx) created from the building layer, can then be used as input to the tool. For more information about working with Revit data, see What is BIM data.

  • Building layers whose source are feature classes in a geodatabase can be used as input. The BIM File To Geodatabase tool can be used to copy BIM features to a geodatabase. Use the Make Building Layer tool to create a building layer from the BIM features.

  • Individual category or discipline layers are not supported as input to this tool. Individual category layers can be used as input to the Create 3D Object Scene Layer Package tool, but they must first be copied to a geodatabase using the Copy Features tool and added as a stand-alone multipatch feature class to the scene.

  • Filters authored on the building layer are written to the scene layer package and are consumed in clients that support reading filters.

  • For more information on building scene layers, see Building scene layers.

  • The output coordinate system should match the spatial reference of the web scene in which it will be displayed. If the intended display environment will be a global web scene, the output coordinate system must use GCS WGS84 or China Geodetic Coordinate System 2000. A vertical coordinate system for a global scene must be ellipsoidal, EGM2008 Geoid, or EGM96 Geoid.

  • The following are considerations for how z-coordinates should be defined in the 3D data being processed:

    • If the output scene layer package will have x,y coordinates in GCS WGS84, the z-coordinate system can be defined using any coordinate system with WGS84 as the datum or EGM96 or EGM2008 through the Output Coordinate System parameter. If the z-coordinate system is undefined, vertical units will be in meters.
    • If the output scene layer package will have x,y coordinates in a projected coordinate system, the z-coordinate system can be defined only if the datum matches the x,y coordinates. If no z-coordinate system is specified, the linear units of the undefined z-coordinate system will match the x,y, coordinate system.

  • A scene layer package can be uploaded and published directly to ArcGIS Online or Portal for ArcGIS in a browser. Additionally, use the Share Package tool to upload and publish directly to ArcGIS Online or Portal for ArcGIS.

Syntax

arcpy.management.CreateBuildingSceneLayerPackage(in_dataset, out_slpk, {out_coor_system}, {transform_method}, {texture_optimization})
ParameterExplanationData Type
in_dataset

The input building layer or layer file (.lyrx).

Building Layer; Layer File
out_slpk

The output scene layer package (.slpk).

File
out_coor_system
(Optional)

The coordinate system of the output scene layer package. It can be any projected or custom coordinate system. Supported geographic coordinate systems include WGS 1984 and China Geodetic Coordinate System 2000. WGS 1984 and EGM96 Geoid are the default horizontal and vertical coordinate systems, respectively. The coordinate system can be specified in any of the following ways:

  • Specify the path to a .prj file.
  • Reference a dataset with the desired coordinate system.
  • Use an arcpy.SpatialReference object.

Spatial Reference
transform_method
[transform_method,...]
(Optional)

The datum transformation method that will be used when the input layer's coordinate system uses a datum that differs from the output coordinate system. All transformations are bidirectional, regardless of the direction implied by their names. For example, NAD_1927_to_WGS_1984_3 will work correctly even if the datum conversion is from WGS 1984 to NAD 1927.

Note:

The ArcGIS Coordinate System data is required for vertical datum transformations between ellipsoidal and gravity-related and two gravity-related datums.

String
texture_optimization
(Optional)

Specifies the textures that will be optimized according to the target platform where the scene layer package is used. Desktop includes Windows, Linux, and Mac platforms. Mobile include iOS and Android.

Caution:

Optimizations that include ETC2 may take significant time to process. For fastest results, use Desktop or None.

  • ALLTexture formats will be optimized for use on desktop, web, and mobile platforms. Texture formats will be JPEG, DXT, and ETC2.
  • DESKTOPTexture formats will be optimized for use on desktop and web platforms. Texture formats will be JPEG and DXT.
  • MOBILETexture formats will be optimized for use on desktop and mobile platforms. Texture formats will be JPEG and ETC2.
  • NONETextures formats will be optimized for use on a desktop platform. The texture format will be JPEG.
String

Code sample

CreateBuildingSceneLayerPackage example (Python window)

The following script demonstrates how to use the CreateBuildingSceneLayerPackage function in the Python window.

import arcpy
arcpy.management.CreateBuildingSceneLayerPackage(r'c:\temp\buildings.lyrx',
                                                 r'c:\temp\output.slpk',
                                                 arcpy.SpatialReference(4326),
                                                 'DESKTOP')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics