ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Labeling data with unit conversion

You can display values in labels with the appropriate rounding rule applied.

  1. Start ArcMap.
  2. On the main menu, click Customize > Toolbars > Labeling.
  3. Click the Label Manager button Label Manager on the Labeling toolbar.
  4. Check the box next to the layer you want to label.

    Optionally, select the layer and create label classes.

  5. Choose a label class under the layer.
  6. Click Expression.
  7. From the Label Expression dialog box, enter or load the appropriate label expression.

    The following is an example of an expression to apply a rounding rule for labeling. You may have to replace DEPTH_M and DEPTH_M_RR with the field names that apply to your label.

    Function FindLabel ( [DEPTH_M], [DEPTH_M_RR] ) 
      if ISNULL( [DEPTH_M_RR] ) then
        FindLabel = ""
      else
        set ipLabelHelper = CreateObject("ESRI.Production.Nautical.LabelHelperClass")
        set ipRounder = ipLabelHelper.GetUnitsRounder( [DEPTH_M_RR] )
        if ipRounder Is Nothing then
          FindLabel = ""
        else
          set ipValue = ipRounder.Round( [DEPTH_M] )
          FindLabel = "<CLR red='1' green='1' blue='1'><BOL><FNT name=""Arial"" size=""12"">" &  ipValue.IntegerString & "</FNT><FNT name=""Arial"" size=""15""><SUB>" & ipValue.FractionalString & "</SUB></FNT></BOL></CLR>"
        end if
      end if
    End Function
    

  8. Click Verify to make sure there are no syntax errors and click OK.
  9. Click OK to close the Label Manager dialog box.

    Features are labeled with the appropriate rounding rule applied to the destination field. If unit destination values are updated, the appropriate rounding is reapplied for the labels.

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2020 Esri. | Privacy | Legal