Select to view content in your preferred language

Print Task & Dynamic Text

799
4
01-21-2014 10:20 AM
AndrewPratt
Regular Contributor
I have set up a map template for one of my maps that works really well. One issue i'm trying to resolve is my map runs a tool that generates some simple statistics and displays them as a table in the TOC. I'd like those values to get passed into the print template and I'm not sure how to do that. I know there's the authorText, copyrightText and titleText values that I can populate and pass across and then use dynamic text box's and those do work but the issue I have is I can't seem to get a long string to format on the print template side so that it displays as follows...

Number of projects: 4
Total Ac Upland: 56
Total Ac Wetland: 73
Secured Ac: 2
Influence Ac: 6
Total $: 1234


I can pass across a string like "Number of projects: 4,Total Ac: 56,Total $: 1234" but how do format the dynamic text to add a line return at each "," ?

Failing that can I pass over other dynamic text like <dyn type="user"/> ?
0 Kudos
4 Replies
SteveCole
Honored Contributor
I don't know if there is an elegant way of doing what you want but you could just have three dynamic text boxes (w/ids) that are aligned on top of each other like you want and then pass each value to its corresponding dynamic text element.
0 Kudos
AndrewPratt
Regular Contributor
My issue is that I need to pass over a map title and 6 map statistics so 7 variables in total and right now I only have 3 (author, copyright and title).
0 Kudos
SteveCole
Honored Contributor
Right, and what I'm suggesting is that perhaps you can use a technique like what is discussed in this thread (and this one) to feed that additional information into your map's layout. This does assume that you're modifying or creating new map template MXDs and that within those MXDs, you have the dynamic text elements already created and you just reference the ID you associate with each.

FWIW, this other thread implies that you can use "\n" to force a line feed in text you pass along.
0 Kudos
MichaelVolz
Esteemed Contributor
Would anyone have sample code that shows this functionality in action?
0 Kudos