Format the input value using the unit format. This method
must be called on the MCT. Use QueuedTask.Run.
Format an Elevation Using the Current Map Elevation Unit
var mv = MapView.Active;
var map = mv.Map;
QueuedTask.Run(() =>
{
//Get the current elevation unit. If the map is not
//a scene the default Project distance unit is returned
var elev_unit = map.GetElevationUnitFormat();
//Format the view camera elevation
var str = elev_unit.FormatValue(mv.Camera.Z);
System.Diagnostics.Debug.WriteLine($"Formatted elevation: {str}");
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.