Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- from arcpy import env
- env.workspace = r"G:PROJECTSroad70-75"
- counter = 0
- for mxdname in arcpy.ListFiles("*.mxd"):
- print mxdname
- mxd = arcpy.mapping.MapDocument(
- r"G:PROJECTSroad70-75\" + mxdname)
- for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
- if elm.text.startswith(u'd'):
- elm.text = elm.text.replace(u'd', u'map num: ')[0]
- print 'elm.text','n'
- counter = counter + 1
- mxd.save()
- del mxd
- print 'total maps: ', counter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement