public DisplayUnitFormat GetElevationUnitFormat()
Public Function GetElevationUnitFormat() As DisplayUnitFormat
public DisplayUnitFormat GetElevationUnitFormat()
Public Function GetElevationUnitFormat() As DisplayUnitFormat
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
{
var elev_unit = map.GetElevationUnitFormat();
var line = $"{elev_unit.DisplayName}, {elev_unit.UnitCode}";
System.Diagnostics.Debug.WriteLine(line);
}
{
//Get the current elevation unit. If the map is not
//a scene the default Project distance unit is returned
var elev_unit = await QueuedTask.Run(() => map.GetElevationUnitFormat());
//Format the view camera elevation
var str = elev_unit.FormatValue(mapView.Camera.Z);
System.Diagnostics.Debug.WriteLine($"Formatted elevation: {str}");
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)