Resumen
The ElevationSource object provides access to the properties of elevation source layers in an elevation surface.
Debate
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.
Propiedades
Propiedad | Explicación | Tipo de datos |
dataSource (Sólo lectura) | 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. Sugerencia: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 (Lectura y escritura) | Gets and sets the name for the elevation source. | String |
visible (Lectura y escritura) | Specifies whether an elevation source is displayed. | Boolean |
Muestra de código
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)
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()