ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

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

About manipulating the text on hatches

A hatch definition may or may not be labeled. When labeled, you have control over things such as the text symbol that is used and whether the text will automatically be flipped as the direction of the route changes.

By default, the text associated with a hatch is the route measure at the hatch location. This text can be supplemented with a prefix and/or suffix value.

For more advanced needs, you can programmatically generate a hatch's text by writing a script in Microsoft VBScript or JavaScript. Your script can include any valid statements those programming languages support.

When writing a script, you access the route measure for each hatch using the esri_measure constant value.

The following script, which could be used in step 10 of How to generate the text on hatches using a script, tells the hatching algorithm to not label a hatch if its measure value is within 0.1 measure units of the value stored in a field named MMAX. This method can be used instead of an end hatch tolerance that tells the hatch algorithm not to draw either the hatch or its label.

Function FindLabel (esri__measure, [MMAX]) 
	mmax = [MMAX] 
	m = esri__measure 
	if (mmax - m) <= 0.1 then 
	  FindLabel = "" 
	else
	  FindLabel = cstr(round(m,2)) 
	end if 
End Function

For more information on VBScript and/or JavaScript, click the Help button on the Hatch Text Expression dialog box.

Related Topics

  • About hatching route feature classes
  • About displaying hatches
  • Hatching options
  • How to generate the text on hatches using a script
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal