ArcGIS Pro 2.6 API Reference Guide
SetElevationSurface Method

ArcGIS.Desktop.Mapping Namespace > Map Class : SetElevationSurface Method
The surface to set into the collection
Set to true to automatically set or override the vertical units of each underlying elevation source
Set the elevation surface into the existing collection of elevation surfaces on the map. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetElevationSurface( 
   CIMMapElevationSurface cimsurface,
   bool overrideVerticalUnit
)
Public Sub SetElevationSurface( _
   ByVal cimsurface As CIMMapElevationSurface, _
   Optional ByVal overrideVerticalUnit As Boolean _
) 

Parameters

cimsurface
The surface to set into the collection
overrideVerticalUnit
Set to true to automatically set or override the vertical units of each underlying elevation source
Exceptions
ExceptionDescription
Invalid surface
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
If an existing surface has the same MapElevationID as the input surface it will be overwritten
If the input surface contains invalid elevation sources an System.ArgumentException is thrown.
An elevation surface with no elevation sources is considered valid and can be added to the map
Null VerticalUnit values are always set regardless of the overrideVerticalUnit value.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

Map Class
Map Members