ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Map Class / GetElevationProfileFromSurface Method / GetElevationProfileFromSurface(MapPoint,MapPoint,Int32) Method
The start point.
The end point.
The number of points required in the resulting polyline. Note this count includes the start and end points. There must be at least 10 points.

In This Topic
    GetElevationProfileFromSurface(MapPoint,MapPoint,Int32) Method
    In This Topic
    Gets an elevation profile calculated between startPoint and endPoint. Intermediate points are calculated at equal distances between the end points according to the numPoints specified. All Z values of the calculated polyline are populated from the Ground Surface Layer. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public ElevationProfileResult GetElevationProfileFromSurface( 
       MapPoint startPoint,
       MapPoint endPoint,
       int numPoints
    )
    Public Overloads Function GetElevationProfileFromSurface( _
       ByVal startPoint As MapPoint, _
       ByVal endPoint As MapPoint, _
       ByVal numPoints As Integer _
    ) As ElevationProfileResult

    Parameters

    startPoint
    The start point.
    endPoint
    The end point.
    numPoints
    The number of points required in the resulting polyline. Note this count includes the start and end points. There must be at least 10 points.

    Return Value

    An ElevationProfileResult. If successful, this contains the generated polyline.
    Exceptions
    ExceptionDescription
    startPoint or endPoint are null.
    startPoint or endPoint cannot be empty.
    numPoints cannot be smaller than 10.
    This Map does not have a visible Ground Surface Layer.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.4 or higher.
    See Also