Ask A Cartographer

Data Driven Page static text

May 11 2011 | 2 comments
Categories: Data Driven Pages

Is there a way to have text change from one page to the next in a Data Driven Page setup, where the text reflects certain attributes of a layer or other information that changes from map to map? I am not talking about the Dynamic text per se, but notation made that change from one map to the next in a DDP system.

Data Driven Pages do not allow for me to change notation manually on each different map because the DDP changes the Data Frame Position, but leaves Layout View static elements alone. If I change the static elements, they are reflected in each page.

Dynamic text is all fine and good, but some of the notation I need to change will actually change position on one map to the next and a DDP system does not allow that.

What can I do?

Mapping Center Answer:

One option that might work is to use dynamic text to reference another field (a field that identifies the change you want to show). This field has to relate to the index field driving the data driven pages (the value from the field will be from the same row as the value from the index field). This is the dynamic text tag:

<dyn type = “page” property = “FIELD_NAME”/>

The second option requires arcpy.mapping and python.  Using an export script you can move the text elements and hardcode them. This requires a fair amount of scripting so to get started take a look at the ArcPy Mapping Module, and more specifically the Text Element section.

Additionally, refer to the Conditional Frame Formatting question we got here on Ask a Cartographer to see an example of how to move elements on the page. This is not moving text, but can be modified to do so.

A workaround posted by Peter Goodman on Sep 21 2011 11:13AM
A workaround I found on this uses your primary suggestion, but I slightly modified it.

By adding columns to the Attribute Table of the Grid Index created for the Data Driven Page shapefile, (I use Text variables for specific purposes) I have been able to get the needed text to come and go as needed on each page.

By simply replacing "name" with the name of the column included with the object, the dynamic text brings up the needed variable. BUT the added aspect of the PageName or PageNumber variable in the attribute table allows for the text to appear on the given page.

The problem I had is that the scale bars I use changes dramatically from one page to the next. Because of the automation system employed by the scale bar in the ESRI Symbol Library, the bar changes size and/or clutters up with numbers and divisions that make the bar look really bad! In addition, to keep consistency on various other aspects such as actual division spacing etc, the scale bar needed to be converted from a dynamic element to a static graphic. This was simply done in the right-click menu of the scale bar properties box. Then ungroup the whole bunch and insert the script into the properties box of the text above the scale bar. Changing the Symbol Style, Font etc, I got the needed effect and it ties in directly to the DDP that I am on specifically. The big work is in adding columns and editing the whole lot.

An added benefit is that the text can be placed anywhere on the Layout View.
Thanks for the info! Changes in 10.1. posted by Aileen Buckley on Sep 28 2011 5:10PM
Thanks for the tip on this. We are aware of the scale bar issues and have made improvements to its behavior in 10.1. Of course, that is not yet available, but this will be something to look forward to!

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |