ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapView Class / ShowElevationProfileGraph Method / ShowElevationProfileGraph(ElevationProfileResult) Method
The elevationProfile result.
Example

In This Topic
    ShowElevationProfileGraph(ElevationProfileResult) Method
    In This Topic
    Shows the elevation profile of the specified ElevationProfileResult. An ElevationProfileResult is obtained from a Map.GetElevationProfileFromSurface function call. The Z values of the geometry of the elevationProfile is displayed as-is; no additional Z calculations are performed.
    Syntax
    public void ShowElevationProfileGraph( 
       ElevationProfileResult elevationProfile
    )
    Public Overloads Sub ShowElevationProfileGraph( _
       ByVal elevationProfile As ElevationProfileResult _
    ) 

    Parameters

    elevationProfile
    The elevationProfile result.
    Exceptions
    ExceptionDescription
    elevationProfile is null.
    An elevation profile cannot be displayed on the current map.
    The specified elevationProfile does not have a valid result that can be displayed in a profile.
    Remarks
    Use the ElevationProfileGraphAdded delegate to determine when the elevation profile graph is added to the mapView. Once this has occurred, MapView.GetElevationProfileGraph will return a non-null ElevationProfileGraph.
    Example
    Show Elevation profile graph using an ElevationProfileResult
    var elevProfileResult = await MapView.Active.Map.GetElevationProfileFromSurfaceAsync(startPt, endPt, 10);
    if (elevProfileResult.Status != SurfaceZsResultStatus.Ok)
      return;
    
    if (!MapView.Active.CanShowElevationProfileGraph())
      return;
    
    // show the elevation profile using the result
    MapView.Active.ShowElevationProfileGraph(elevProfileResult);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also