HOW TO

Set places past the decimal in the display box

Last Published: April 25, 2020

Summary

Instructions provided describe how to adjust the number of digits after the decimal place, shown in the display box at the bottom right of ArcMap.

Note:
The size of the Status Bar cannot be changed. If the number of decimal places exceed the allotted space, the units may be truncated.


This is no longer necessary at 9.2. An option has been included under Tools > Options > Data View. Specify the number of decimal places for the Coordinate Display.

Procedure

To adjust the number of digits after the decimal place, enter a code using Visual Basic Editor.

  1. Start ArcMap and click the Tools menu.
  2. Click Macros > Visual Basic Editor.
  3. To adjust the number of digits to the map project:
    A. Click the project.mxd folder.
    B. Click the ArcMap Objects folder.
    C. Right-click 'ThisDocument'.
    D. Select View code.

    To adjust the number of digits to the template:
    A. Click the normal.mxt folder.
    B. Click ArcMap Objects.
    C. Right-click 'ThisDocument'.
    D. Select View code.
  4. Paste the following code into the box that displays. The line that states 'rounding value' is the number of decimal places that can be set. The 'alignment width' is how big the display box can show numbers. To view all the numbers, adjust 'alignment width' to match the number of places set as the rounding value. In other words, the more numbers after the decimal, the wider the 'alignment width'.
    Code:
    Sub main()

    Dim pDoc As IMxDocument
    Dim pRepUnit As IReportUnitFormat
    Dim pNumericFormat As INumericFormat

    Set pDoc = ThisDocument
    Set pRepUnit = pDoc

    Set pNumericFormat = New NumericFormat
    With pNumericFormat
    .AlignmentOption = esriAlignRight
    .RoundingOption = esriRoundNumberOfDecimals
    .AlignmentWidth = 15
    .RoundingValue = 6
    .ShowPlusSign = False
    .UseSeparator = True
    .ZeroPad = False
    End With

    Set pRepUnit.NumericFormat = pNumericFormat

    End Sub

  5. Select Run Macro in Visual Basic.
  6. Return to ArcMap.
  7. To verify the number of digits past the decimal, move the mouse around while watching the data view.

Article ID:000008839

Software:
  • 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