2

I am currently using Arcgis 10.2 and working with dynamic text. I'm aware of formatting tags available (http://resources.arcgis.com/en/help/main/10.1/index.html#/Formatting_tags_available_in_ArcMap/00s800000017000000/) however, there is no proper case function? I know i can always field calculate, but everything in our data is always all caps and would be easier to specify through dynamic text. Is this function just not available in arcmap, or do i have to dig deeper?

  • You can do this for labels easily using a Python function. However, as far as I am aware there isn't an equivalent for dynamic text. – Snorfalorpagus Feb 24 '15 at 17:10
  • It's probably easier to fix the data. You will need something that can handle names such as MCDAVID = McDavid. I haven't done much programming with DDP so I don't know how easy it is control the elements when DDP changes but when I made my own tool with similar functionality I was able to place any text I wanted into text elements on refresh or whatever other events. If your Kung-Fu is strong and if it's worth the effort make your own DDP addin. – Jakub Sisak GeoGraphics Feb 24 '15 at 18:30
2

If you give the text elements a name that you can refer to in a script, you could build a script that processes the Data Driven Pages and sets the text to proper case.

First, give the text elements in question a name like so:

enter image description here

Then, in your script, refer to these elements and set the text to proper case.

mxd = arcpy.mapping.MapDocument("CURRENT")
text_elements = arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT")
for element in text_elements:
    if element.name == 'My Text Field':
        element.text = element.text.proper()

This would be part of a larger script which does the DDP processing. Or, you could run the above for every page individually before you export the page.

Of course, it's probably easier to create a new field and set it to the proper case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.