HOW TO

Use AML variables with TEXTSTYLE TYPESET

Last Published: April 25, 2020

Summary

Variables are useful for parameters and values that are used in multiple places of an aml. This will not only simplify your aml but it will make it easier to maintain. Rather than changing each instance of a parameter or value, you would just change the variable definition. Variables used to display text strings when TEXTSTYLE has been set to TYPESET require special handling, as described below.

Procedure



Example:

To display the number and notation 118° on the screen, without variables, you would use the syntax:

textset font
textsymbol 3
textstyle typeset
move *
text '118!pat1713;'

You could do the same using a variable:

&s d = 118
textset font
textsymbol 3
textstyle typeset
move *
text '%d%!pat1713;'


This, however, will incorrectly draw %d%° to the screen.

To avoid this, insert the variable string within the [QUOTE] function, and assign a single-quoted semi-colon to a variable and reference it with [UNQUOTE] in the TEXT command:

&s d = 118
&s sc = ';'
textset font
textsymbol 3
textstyle typeset
move *
text [quote %d%!pat1713[unquote %sc%]]


The string 118° will now display correctly on the screen.

Article ID:000002244

Software:
  • Legacy Products
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic