import arcpy import os import glob folder = r"\\sample\sample" oldtext = "Township" newtext = "Borough" mxds = glob.glob(folder + '\\' + '*.mxd') arcpy.gp.overwriteOutput = True for mxdFile in mxds: mxd = arcpy.mapping.MapDocument(mxdFile) for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"): if elm.text == oldtext: elm.text = newtext mxd.save() del mxd
for mxdFile in mxdList: mxd = arcpy.mapping.MapDocument(mxdFile) for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"): if elm.text == "works": elm.text = "replaceword" mxd.save()
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.