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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.