ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMBaseLayer Class / LayerElevation Property
Example

In This Topic
    LayerElevation Property
    In This Topic
    Gets or sets the layer elevation.
    Syntax
    public CIMLayerElevationSurface LayerElevation {get; set;}
    Public Property LayerElevation As CIMLayerElevationSurface
    Example
    Set a custom elevation surface to a Z-Aware layer
    //Define the custom elevation surface to use
    //At 2.x - var layerElevationSurface = new CIMLayerElevationSurface
    //{
    //  MapElevationID = "{3DEC3CC5-7C69-4132-A700-DCD5BDED14D6}"
    //};
    var layerElevationSurface = new CIMLayerElevationSurface
    {
      ElevationSurfaceLayerURI = "https://elevation3d.arcgis.com/arcgis/services/WorldElevation3D/Terrain3D/ImageServer"
    };
    //Get the layer's definition
    var lyrDefn = featureLayer.GetDefinition() as CIMBasicFeatureLayer;
    //Set the layer's elevation surface
    lyrDefn.LayerElevation = layerElevationSurface;
    //Set the layer's definition
    featureLayer.SetDefinition(lyrDefn);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also