ElevationSource

Summary

The ElevationSource object provides access to the properties of elevation source layers in an elevation surface.

Discussion

An elevation source layer references the data that contributes height values to an elevation surface. Elevation source layers can reference local sources such as rasters or TINs or web elevation layers hosted in ArcGIS Online or ArcGIS Enterprise. You can access properties such as the name, visibility, and data source for each elevation source layer.

Properties

PropertyExplanationData Type
dataSource
(Read Only)

The complete path for the elevation source's data source. It includes the full workspace path and name of the dataset. For enterprise geodatabase layers, a string containing the layer's connection information is returned.

Tip:

Enterprise geodatabase layers in an ArcGIS AllSource project do not retain the path to the database connection file (.sde) that was used to create the layer.

String
name
(Read and Write)

Gets and sets the name for the elevation source.

String
visible
(Read and Write)

Specifies whether an elevation source is displayed.

Boolean

Code sample

ElevationSource example 1

The following script will print the data source for each elevation source layer in an elevation surface

p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Scene')[0]
for surface in m.listElevationSurfaces():
    for source in surface.listElevationSources():
        print(source.dataSource)
ElevationSource example 2

The following script will turn the visibility off for all elevation source layers in the 3D scene.

p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Scene')[0]
for surface in m.listElevationSurfaces():
    for source in surface.listElevationSources():
        source.visible = False
p.save()