Parameters
- fileName
- The file to export the elevation profile information to
| Exception | Description |
|---|---|
| System.ArgumentNullException | fileName cannot be null. |
| System.ArgumentException | The fileName does not have a .csv extension or the elevation profile calculation has not completed. |
{
var elevProfileGraph = MapView.Active.GetElevationProfileGraph();
// Elevation profile graph will be null if no profile graph is displayed
if (elevProfileGraph == null)
return;
if (elevProfileGraph.CanExport)
{
elevProfileGraph.ExportToImage("c:\\temp\\myprofileImage.png");
elevProfileGraph.ExportToCSV("c:\\temp\\myprofile.csv");
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)