ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Core.UnitFormats Namespace / DisplayUnitFormats Class / SetDefaultProjectUnitFormat Method
The project default unit format to set

In This Topic
    SetDefaultProjectUnitFormat Method (DisplayUnitFormats)
    In This Topic
    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
    This method or property must be called within the lambda passed to QueuedTask.Run
    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 11, Windows 10, Windows 8.1

    See Also