Skip To Content

Add and modify dynamic text

Dynamic text is text placed on a layout that changes based on the current properties of the project, a map frame, a map, and so on. Dynamic text works through the use of tags, similar to HTML. This allows you to combine both dynamic and static text in a single text element.

The following is an example of a dynamic text tag for the name of the project:

<dyn type="project" property="name"/>

This is what you would see in the Text box in the Format Text pane. On the page layout, you would see the name of the current project.

Note:

If you convert a text element containing a dynamic text tag to a graphic, the tag is replaced with its current value, which is the text currently being displayed on the page.

Add dynamic text

You can always type a tag into an existing text element, but a gallery of commonly used tags is also available on the Insert tab. This inserts a new piece of text that already contains the chosen tag.

  1. On the Insert tab in the Text group, click Dynamic Text Add Dynamic Text.

    Choosing a tag from this gallery inserts a piece of text containing that tag onto the page.

  2. Move, format, and edit the text, as desired.

Edit dynamic text

Text elements utilizing dynamic text tags can be as simple or complex as needed. In some cases, you may just need a single, stand-alone tag, but other cases may call for the use of several tags along with static text.

The following is an example for keeping track of the last person to work on a project:

Last updated on <ITA><dyn type="project" property="dateSaved" format="long"/></ITA> by <ITA><dyn type="user"/></ITA>.

This example uses static text, two dynamic text tags, a modifier on the first tag to specify the date format, and two formatting tags to italicize the date and the user name. The output would look something like "Last updated on Monday, June 9, 2014 by userName."

Note:

It is important to note that text formatting tags will only apply if the current font has that style.

Learn more about text formatting tags

You can modify your text element in the Format Text pane.

  1. Right-click the text element in the Contents pane, or on the page, and click Properties.
  2. In the Format Text pane, click Options. Type the desired combination of static text, dynamic text tags, and formatting tags into the text input box in the Text group.

Numeric values

You can modify the number of decimal places used by tags that return numeric values, by using the decimalPlaces attribute. For example, <dyn type="mapFrame" name="MapFrameName" property="lowerMid" units="ddm" decimalPlaces="0"/> will display as '-95 13 32 58', and <dyn type="mapFrame" name="Map Map Frame" property="lowerMid" units="ddm" decimalPlaces="2"/> will display as '-95 13.29 32 57.68'.

Empty strings

If a text element contains nothing but a dynamic text tag that currently parses to nothing, you will see an empty bounding box displayed on the layout when the element is selected.

If a text element contains additional static text, or an additional dynamic text tag that does parse to a value, that text displays. For example, if you have the following text on a layout that has never been exported: Last exported: <dyn type="layout" name="Layout" property="dateExported"/>, it will appear as "Last exported:" on the page until the page has been exported.

However, if you want certain text to display when a tag parses to null, you can add emptyStr="<text>" to the dynamic text tag. For example, consider the following tag:

Credits: <dyn type="mapFrame" name="Map Frame" property="credits"/>

If the map contains no credit information, the result on the layout would be "Credits:". By using the empty attribute, you can have default text when there is no information available. The text would look similar to the following:

Credits: <dyn type="mapFrame" name="<Map Frame Name>" property="credits" emptyStr="Credits for this map were unavailable."/>

The result on the layout would be "Credits: Credits for this map were unavailable."

Pre and post strings

Pre and post string attributes can be used to add text before or after a tag. The advantage of using these attributes over static text is that they will only appear on the layout if the dynamic text tag has a value. For example, consider the following tag:

Date Exported: <dyn type="layout" name="Layout" property="dateExported" format="short"/>

If the layout has never been exported, the result on the layout would be "Date Exported:". Instead of adding an empty string attribute to explain that it has not been exported, you could remove the static text and add pre and post string attributes instead so "Date Exported:" would not appear on the page, on screen. or when printed.

<dyn type="layout" name="Layout" property="dateExported" format="short" preStr="Last exported on " postStr="."/>

This way, the text on the page will be blank until the layout is exported. Once the layout has been exported, the text would look something like this:

Last exported on 2/11/2015.

Learn more about formatting dates and time

New lines

To start a new line with a dynamic text tag, add the new line attribute. The tag would look something like this:

Date Saved <dyn type="project" property="dateSaved" format="short|short" newLine="true"/>

The result on the layout would be:

Date Saved

1/27/2015 11:20 AM

Learn more about formatting dates and time

System tags

The following table lists the available tags for system information:

System

DescriptionExample syntax

Computer Name

<dyn type="computer"/>

Current Date

<dyn type="date" format=""/>

Current Time

<dyn type="time" format=""/>

User Name

<dyn type="user"/>

Note:

Selecting Current Time from the Dynamic Text gallery on the Insert tab will insert a piece of text with both the current date and current time tags. The result in the Format Text pane will be Current Time <dyn type="mapFrame" name="{0}" property="time" format="short|short"/>.

Learn more about formatting dates and time

Project tags

The following tags are available for project information:

Project

DescriptionExample syntax

Name

<dyn type="project" property="name"/>

Path

<dyn type="project" property="path"/>

Folder

<dyn type="project" property="folder"/>

Date Saved

<dyn type="project" property="dateSaved" format="short|short"/>

Default Folder

<dyn type="project" property="defaultFolder"/>

Default Geodatabase

<dyn type="project" property="defaultGeodatabase"/>

Default Toolbox

<dyn type="project" property="defaultToolbox"/>

Project - default units

DescriptionExample syntax

Default Distance Units

<dyn type="project" property="distUnits"/>

Default Angular Units

<dyn type="project" property="angularUnits"/>

Default Area Units

<dyn type="project" property="areaUnits"/>

Default Page Units

<dyn type="project" property="pageUnits"/>

These tags refer to settings on the Project tab, in the Options dialog.

Layout tags

The following tags are available for layouts:

Layout

DescriptionExample syntax

Date Exported

<dyn type="layout" name="LayoutName" property="dateExported" format= "short|short"/>

Date Printed

<dyn type="layout" name="LayoutName" property="datePrinted" format= "short|short"/>

Metadata

When you select this option from the menu, a text element containing a set of metadata tags is inserted. See the table below for a breakdown.

Name

<dyn type="layout" name="LayoutName" property="name"/>

Service Layer Credits

<dyn type="layout" name="LayoutName" property="serviceLayerCredits"/>

This tag will display the service layer credits for all maps on the page.

Layout metadata

DescriptionExample syntax

Title

<dyn type="layout" property="metadata" attribute="title"/>

Tags

<dyn type="layout" property="metadata" attribute="tags"/>

Summary

<dyn type="layout" property="metadata" attribute="summary"/>

Description

<dyn type="layout" property="metadata" attribute="description"/>

Credits

<dyn type="layout" property="metadata" attribute="credits"/>

Use Limit

<dyn type="layout" property="metadata" attribute="uselimit"/>

Map frame tags

Map frame tags display information about map frames and the maps they contain.

When you create a dynamic text tag for a specified map frame, the map frame is referenced by the name it has when the tag is created. For example, if the current default map frame is named My Map and you insert a dynamic text element for the scale, the tag will be: <dyn type="mapFrame" name="My Map" property="scale"/>.

If you later rename the map frame, the tag remembers the map frame it references, but the tag will not update to reflect the map frame's new name.

The following map frame tags are available:

Map frame

DescriptionExample syntax

Camera

When you select this option from the menu, a text element containing a set of camera tags is inserted. See the table below for a breakdown.

Credits

<dyn type="mapframe" name="MapFrameName" property="credits"/>or<dyn type="mapframe" name="MapFrameName" property="metadata" attribute="credits"/>

Description

<dyn type="mapframe" name="MapFrameName" property="description"/>or<dyn type="mapframe" name="MapFrameName" property="metadata" attribute="description"/>

Map Units

<dyn type="mapFrame" name="MapFrameName" property="mapUnits"/>

Metadata

When you select this option from the menu, a text element containing a set of metadata tags is inserted. See the table below for a breakdown.

Name

<dyn type="mapFrame" name="MapFrameName" property="name"/>

Name of Map

<dyn type="mapFrame" name="MapFrameName" property="mapName"/>

Reference Scale

<dyn type="mapFrame" name="MapFrameName" property="referenceScale"/>

Relative Scale

1 inch equals <dyn type="mapFrame" name="Map Map Frame" property="scale" pageUnits="in" mapUnits="mi" pageValue="1" decimalPlaces="0"/> miles

This tag modifies the map's scale to be relative to the page. The attribute pageUnits is used to set the desired units in page space, such as inches or centimeters, and pageValue is used to set the number of these units used. The attribute mapUnits is used to set units for the map's scale.

Relative Scale Metric

1 centimeter equals <dyn type="mapFrame" name="Map Map Frame" property="scale" pageUnits="cm" mapUnits="km" pageValue="1" decimalPlaces="2"/> kilometers

This tag modifies the map's scale to be relative to the page. The attribute pageUnits is used to set the desired units in page space, such as inches or centimeters, and pageValue is used to set the number of these units used. The attribute mapUnits is used to set units for the map's scale.

Rotation

<dyn type="mapFrame" name="MapFrameName" property="rotation"/>

Scale

<dyn type="mapFrame" name="MapFrameName" property="scale" preStr="1:"/>

Center Scale

<dyn type="mapFrame" name="MapFrameName" property="centerscale" preStr="1:"/>

This tag will compute the scale at the center latitude and longitude of the associated map frame.

Spatial Reference

When you select this option from the menu, a text element containing a set of spatial reference tags is inserted. See the table below for a breakdown.

Map frame camera

DescriptionExample syntax

X

<dyn type="mapFrame" name="MapFrameName" property="camera.x" units="dms" decimalPlaces="0"/>

Y

<dyn type="mapFrame" name="MapFrameName" property="camera.y" units="dms" decimalPlaces="0"/>

Scale

<dyn type="mapFrame" name="MapFrameName" property="camera.scale" preStr="Scale: 1:"/>

Rotation

<dyn type="mapFrame" name="MapFrameName" property="camera.rotation"/>

Pitch

<dyn type="mapFrame" name="MapFrameName" property="camera.pitch"/>

Roll

<dyn type="mapFrame" name="MapFrameName" property="camera.roll"/>

Map frame metadata

DescriptionExample syntax

Title

<dyn type="mapframe" name="mapFrameName" property="metadata" attribute="title"/>

Tags

<dyn type="mapframe" name="mapFrameName" property="metadata" attribute="tags"/>

Summary

<dyn type="mapframe" name="mapFrameName" property="metadata" attribute="summary"/>

Description

<dyn type="mapframe" name="mapFrameName" property="metadata" attribute="description"/>

Credits

<dyn type="mapframe" name="mapFrameName" property="metadata" attribute="credits"/>

Use Limit

<dyn type="mapframe" name="mapFrameName" property="metadata" attribute="uselimit"/>

Spatial reference tags

DescriptionExample syntax

Name

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="name"/>

Projected Coordinate System

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="pcs"/>

Geographic Coordinate System

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="gcs"/>

Datum

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="datum"/>

Projection

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="projection"/>

Remarks

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="remarks"/>

Central Meridian

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="central meridian"/>

Latitude of Origin

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="latitude of origin"/>

Longitude of Origin

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="longitude of origin"/>

Latitude of Center

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="latitude of center"/>

Longitude of Center

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="longitude of center"/>

Latitude of 1st

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="latitude of 1st"/>

Latitude of 2nd

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="latitude of 2nd"/>

Longitude of 1st

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="longitude of 1st"/>

Longitude of 2nd

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="longitude of 2nd"/>

False Easting

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="false easting"/>

False Northing

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="false northing"/>

Standard Parallel 1

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="standard parallel 1"/>

Standard Parallel 2

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="standard parallel 2"/>

Scale Factor

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="scale factor"/>

Azimuth

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="azimuth"/>

Units

<dyn type="mapFrame" name="MapFrameName" property="sr" srProperty="units"/>

Map frame - coordinates

DescriptionExample syntax

Center

<dyn type="mapFrame" name="MapFrameName" property="center" units="dms" decimalPlaces="0"/>

X

<dyn type="mapFrame" name="MapFrameName" property="center.x" units="dms" decimalPlaces="0"/>

Y

<dyn type="mapFrame" name="MapFrameName" property="center.y" units="dms" decimalPlaces="0"/>

Lower Left

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms" decimalPlaces="0"/>

Lower Middle

<dyn type="mapFrame" name="MapFrameName" property="lowerMid" units="dms" decimalPlaces="0"/>

Lower Right

<dyn type="mapFrame" name="MapFrameName" property="center" units="dms" decimalPlaces="0"/>

Middle Left

<dyn type="mapFrame" name="MapFrameName" property="midLeft" units="dms" decimalPlaces="0"/>

Middle Right

<dyn type="mapFrame" name="MapFrameName" property="midRight" units="dms" decimalPlaces="0"/>

Upper Left

<dyn type="mapFrame" name="MapFrameName" property="upperLeft" units="dms" decimalPlaces="0"/>

Upper Middle

<dyn type="mapFrame" name="MapFrameName" property="upperMid" units="dms" decimalPlaces="0"/>

Upper Right

<dyn type="mapFrame" name="MapFrameName" property="upperRight" units="dms" decimalPlaces="0"/>

If you would like to break the coordinate down into parts and only display latitude or longitude, append ".x" or ".y" to the property you have specified. You can format how coordinate values display using the format tags below.

Decimal Degree Parts

FormatDescriptionExample syntaxExample output

dd

Decimal Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd" decimalPlaces="2" showDirections="True"/>

122.31W

dd.deg

Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.deg" decimalPlaces="2" showDirections="True"/>

122.31

dd.deg.int

Degree Integer

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.deg.int" decimalPlaces="2" showDirections="True"/>

122

dd.dec

Decimal

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.dec" decimalPlaces="2" showDirections="True"/>

31

dd.dir

Direction

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.dir" decimalPlaces="2" showDirections="True"/>

W

dd

Decimal Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd" decimalPlaces="2" showDirections="False"/>

-122.31

dd.deg

Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.deg" decimalPlaces="2" showDirections="False"/>

122.31

dd.deg.int

Degree Integer

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.deg.int" decimalPlaces="2" showDirections="True"/>

122

dd.dec

Decimal

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.dec" decimalPlaces="2" showDirections="False"/>

31

dd.dir

Direction

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dd.dir" decimalPlaces="2" showDirections="False"/>

-

Degree Minute Second Parts

FormatDescriptionExample syntaxExample output

dms

Degrees Minutes Seconds

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms" decimalPlaces="2" showDirections="True"/>

122°18'37.82" W

dms.deg

Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.deg" decimalPlaces="2" showDirections="True"/>

122

dms.deg.sym

Degree Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.deg.sym" decimalPlaces="2" showDirections="True"/>

°

dms.min

Minutes

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.min" decimalPlaces="2" showDirections="True"/>

'

dms.min.sym

Minutes Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.min.sym" decimalPlaces="2" showDirections="True"/>

"

dms.sec

Seconds

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec" decimalPlaces="2" showDirections="True"/>

37.82

dms.sec.sym

Seconds Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec.sym" decimalPlaces="2" showDirections="True"/>

"

dms.sec.int

Seconds Integer

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec.int" decimalPlaces="2" showDirections="True"/>

37

dms.sec.dec

Seconds Decimal

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec.dec" decimalPlaces="2" showDirections="True"/>

82

dd.dir

Direction

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.dir" decimalPlaces="2" showDirections="True"/>

W

dms

Degrees Minutes Seconds

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms" decimalPlaces="2" showDirections="False"/>

-122°18'37.82" W

dms.deg

Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.deg" decimalPlaces="2" showDirections="False"/>

122

dms.deg.sym

Degree Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.deg.sym" decimalPlaces="2" showDirections="False"/>

°

dms.min

Minutes

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.min" decimalPlaces="2" showDirections="False"/>

18

dms.min.sym

Minutes Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.min.sym" decimalPlaces="2" showDirections="False"/>

'

dms.sec

Seconds

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec" decimalPlaces="2" showDirections="False"/>

37.82

dms.sec.sym

Seconds Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec.sym" decimalPlaces="2" showDirections="False"/>

"

dms.sec.int

Seconds Integer

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec.int" decimalPlaces="2" showDirections="False"/>

37

dms.sec.dec

Seconds Decimal

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.sec.dec" decimalPlaces="2" showDirections="False"/>

82

dd.dir

Direction

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="dms.dir" decimalPlaces="2" showDirections="False"/>

-

Decimal Minute Parts

FormatDescriptionExample syntaxExample output

ddm

Decimal Minutes

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm" decimalPlaces="2" showDirections="True"/>

122°18.63 W

ddm.deg

Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.deg" decimalPlaces="2" showDirections="True"/>

122

ddm.min

Minutes

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.min" decimalPlaces="2" showDirections="True"/>

18.63

ddm.min.int

Minutes Integer

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.min.int" decimalPlaces="2" showDirections="True"/>

18

ddm.min.dec

Minutes Decimal

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.min.dec" decimalPlaces="2" showDirections="True"/>

63

ddm.deg.sym

Degree Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.deg.sym" decimalPlaces="2" showDirections="True"/>

°

ddm.dir

Direction

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.dir" decimalPlaces="2" showDirections="True"/>

W

ddm

Decimal Minutes

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm" decimalPlaces="2" showDirections="False"/>

-122°18.63 W

ddm.deg

Degrees

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.deg" decimalPlaces="2" showDirections="False"/>

122

ddm.min

Minutes

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.min" decimalPlaces="2" showDirections="False"/>

18.63

ddm.min.int

Minutes Integer

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.min.int" decimalPlaces="2" showDirections="False"/>

18

ddm.min.dec

Minutes Decimal

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.min.dec" decimalPlaces="2" showDirections="False"/>

63

ddm.deg.sym

Degree Symbol

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.deg.sym" decimalPlaces="2" showDirections="False"/>

°

ddm.dir

Direction

<dyn type="mapFrame" name="MapFrameName" property="lowerLeft" units="ddm.dir" decimalPlaces="2" showDirections="False"/>

-

Map frame - time

DescriptionExample syntax

Start Time

<dyn type="mapFrame" name="MapFrameName" property="startTime" format="short|short"/>

Time

<dyn type="mapFrame" name="MapFrameName" property="time" format="short|short"/>

End Time

<dyn type="mapFrame" name="MapFrameName" property="endTime" format="short|short"/>

Learn more about formatting dates and time

Related topics