ElevationSource

サマリー

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

説明

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.

プロパティ

プロパティ説明データ タイプ
dataSource
(読み取り専用)

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.

ヒント:

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

String
name
(読み書き)

Gets and sets the name for the elevation source.

String
visible
(読み書き)

Specifies whether an elevation source is displayed.

Boolean

コードのサンプル

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()