Public Sub SetLocationUnitFormat( _ ByVal unitFormat As DisplayUnitFormat _ )
public void SetLocationUnitFormat( DisplayUnitFormat unitFormat )
Parameters
- unitFormat
- The location unit format to set
Public Sub SetLocationUnitFormat( _ ByVal unitFormat As DisplayUnitFormat _ )
public void SetLocationUnitFormat( DisplayUnitFormat unitFormat )
| 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 location unit formats |
{
//Get the list of available location unit formats
//for the current map
//Note: Must be on the QueuedTask.Run()
var loc_units = map.GetAvailableLocationUnitFormats();
//arbitrarily use the last unit in the list
map.SetLocationUnitFormat(loc_units.Last());
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)