ArcGIS Pro 2.7 API Reference Guide
SetDefaultProjectUnitFormat Method (DisplayUnitFormats)

ArcGIS.Desktop.Core.UnitFormats Namespace > DisplayUnitFormats Class : SetDefaultProjectUnitFormat Method
The project default unit format to set
Set the given project default unit format in the current project. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetDefaultProjectUnitFormat( 
   DisplayUnitFormat defaultFormat
)
Public Sub SetDefaultProjectUnitFormat( _
   ByVal defaultFormat As DisplayUnitFormat _
) 

Parameters

defaultFormat
The project default unit format to set
Exceptions
ExceptionDescription
Thrown when a method is called on the wrong Pro thread
defaultFormat
Remarks
If there is no current open project, attempting to set the default is ignored.
The specific default to set is determined by the UnitFormatType of the input defaultFormat.
In other words, to set the default project angular unit format, pass in a DisplayUnitFormat from the predefined list of available angular unit formats; to set the default project area unit format, pass in a DisplayUnitFormat from the predefined list of available area unit formats; and so on.
If the provided defaultFormat is not currently in the list of project unit formats for the given DisplayUnitFormat.UnitFormatType then it will be added to the list
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

DisplayUnitFormats Class
DisplayUnitFormats Members