ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Map Class / ClearElevationSurfaceLayers Method
Example Version

ClearElevationSurfaceLayers Method
Will remove all elevation surfaces from the map with the exception of Ground. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void ClearElevationSurfaceLayers()
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
The Ground surface cannot be removed.
On success, an undo-able operation is added to the current operation manager undo stack
Example
Remove elevation surface layers
// wrap in a QueuedTask.Run

map.ClearElevationSurfaceLayers();   //Ground will not be removed

map.RemoveLayer(surfaceLayer);//Cannot remove ground
map.RemoveLayers(map.GetElevationSurfaceLayers()); //Ground will not be removed
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also