public void SetElevationUnitFormat( DisplayUnitFormat unitFormat )
Public Sub SetElevationUnitFormat( _ ByVal unitFormat As DisplayUnitFormat _ )
Parameters
- unitFormat
- The elevation unit format to set
public void SetElevationUnitFormat( DisplayUnitFormat unitFormat )
Public Sub SetElevationUnitFormat( _ ByVal unitFormat As DisplayUnitFormat _ )
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
System.ArgumentException | unit format is of the wrong type |
System.ArgumentException | unit format is not in the list of available elevation unit formats |
System.InvalidOperationException | elevation unit format can only be set on a scene |
var map = MapView.Active.Map; QueuedTask.Run(() => { //Trying to set the elevation unit on a map other than //a scene will throw an InvalidOperationException if (map.IsScene) { //Get the list of available elevation unit formats //for the current map var loc_units = map.GetAvailableElevationUnitFormats(); //arbitrarily use the last unit in the list map.SetElevationUnitFormat(loc_units.Last()); } });
Target Platforms: Windows 11, Windows 10