ArcGIS Pro 2.7 API Reference Guide
SetLocationUnitFormat Method

ArcGIS.Desktop.Mapping Namespace > Map Class : SetLocationUnitFormat Method
The location unit format to set
Sets the current map location unit format for the current project. This method must be called on the MCT. Use QueuedTask.Run
Syntax
public void SetLocationUnitFormat( 
   DisplayUnitFormat unitFormat
)
Public Sub SetLocationUnitFormat( _
   ByVal unitFormat As DisplayUnitFormat _
) 

Parameters

unitFormat
The location unit format to set
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
unit format is of the wrong type
unit format is not in the list of available location unit formats
Remarks
Map location unit formats are used to format the coordinate system display at the bottom of the map or scene as well as format the scale combo box.
Display units
. Unit format must be of type ArcGIS.Desktop.Core.UnitFormats.UnitFormatType.Location or a System.ArgumentException will be thrown.
The location unit format must be in the list of available location unit formats for the map or a System.ArgumentException will be thrown. Refer to: GetAvailableLocationUnitFormats. Note: If the map is using a GCS, linear unit formats are not included (in the list of available units)
.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Map Class
Map Members