import arcpy, os #workspace to search for MXDs Workspace = r"C:\Geo" arcpy.env.workspace = Workspace #list map documents in folder mxdList = arcpy.ListFiles("*.mxd") #set relative path setting for each MXD in list. for file in mxdList: #set map document to change filePath = os.path.join(Workspace, file) mxd = arcpy.mapping.MapDocument(filePath) #set relative paths property mxd.relativePaths = True #save map doucment change mxd.save()
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.