import arcpy import os workspace = r"C:\test" for dirpath, dirnames, filenames in os.walk(workspace): for filename in filenames: if '.mxd' in filename: mxd = arcpy.mapping.MapDocument(os.path.join(dirpath, filename)) mxd.author = "Test GIS Author" mxd.title = "Test GIS Title" mxd.credits = "GIS Credits" mxd.save() del mxd
import arcpy import os workspace = r"C:\test" walk = arcpy.da.Walk(workspace, datatype="Map") for dirpath, dirnames, filenames in walk: for filename in filenames: mxd = arcpy.mapping.MapDocument(os.path.join(dirpath, filename)) mxd.author = "Test GIS Author" mxd.title = "Test GIS Title" mxd.credits = "GIS Credits" mxd.save() del mxd
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.