HOW TO

Set ArcMap display units to decimal degrees programmatically

Last Published: April 25, 2020

Summary

By default, ArcMap uses the Degrees Minutes Seconds format when setting the Map display units to esriDecimalDegrees. How can the display units setting be changed to decimal degrees?

Procedure

Setting map display units to decimal degrees requires the IReportUnitFormat interface in addition to setting the DistanceUnits property on IMap. The following Visual Basic for Applications (VBA) script shows how to use IReportUnitFormat.
Note:
At ArcGIS Version 10, VBA was deprecated and a separate license is required. To use this code, please contact your Esri account representative for a VBA license for 10.


Code:
Sub SetDisplayUnitsDD()

Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument

Dim pMap As IMap
Set pMap = pMxDoc.FocusMap

Dim pReportUnitFormat As IReportUnitFormat
Set pReportUnitFormat = pMxDoc

Set pReportUnitFormat.LatLonFormat = Nothing

pMap.DistanceUnits = esriDecimalDegrees

End Sub

Article ID:000004598

Software:
  • ArcMap 8 x
  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic