Select to view content in your preferred language

Control Character Length in Dynamic Text

2625
3
12-29-2010 12:52 PM
MichaelHoolahan
New Contributor
Hi,

I'm trying to label the Arcmap document "name" dynamically, and I need to trim some of the characters off of the right side.
For example, This is what the name looks like now:
00000-00(000)PR-001 this is a test to remove text.mxd

This is what I would like to show on the finished product:
00000-00(000)PR-001

This is the code I'm using and need to alter in some way:
;<dyn type="document" property="name"/> <dyn type="document" property="date saved" format="short"/>

We have a job code, and usually after the job code, we put a simple description of the map in the name to quickly ID a map we need to find. I just need to remove this description automatically.

Thanks for the help!
0 Kudos
3 Replies
JeffBarrette
Esri Regular Contributor
Michael,

This special formating can't be done within a dynamic tag.  There are not built in options to strip away characters using some pre-determined logic.

This could be done using basic Python string manipulation but that would require that you replace the dynamic tags with scripting logic and use arcpy.mapping to generate your output.  The maps would need to be generated using a script as opposed to it being dynamic within the user interface.

If this is a direction you want to go, I could provide you with some of the logic.

Jeff
0 Kudos
CourtneyGordon1
New Contributor II

Jeff,

Would you be so kind as to help me? I am trying to accmplish a similar task as Michel to no avail. I would like to insert text to my mxd that represents the name of the mxd, but  I need to remove one character from the end.

Thank you!

0 Kudos
JonathanNorton
New Contributor
I would like to know how to do this sense Mike hasnt responded.
0 Kudos