import arcpy, os inputPath = some path outputPath = some other path #Loop through each MXD file for filename in os.listdir(inputPath): fullpath = os.path.join(inputPath, filename) if os.path.isfile(fullpath): if filename.lower().endswith(".mxd"): #Reference MXD and export mxd = arcpy.mapping.MapDocument(fullpath) arcpy.mapping.ExportToJPEG(mxd, outputPath + "\\" + filename + ".jpg")
import arcpy, os inputPath = os.curdir outputPath = os.curdir #Loop through each MXD file for filename in os.listdir(inputPath): fullpath = os.path.join(inputPath, filename) if os.path.isfile(fullpath): if filename.lower().endswith(".mxd"): #Reference MXD and export mxd = arcpy.mapping.MapDocument(fullpath) OutputJPGPath = os.path.join(outputPath, filename.replace(".mxd", ".jpg")) #arcpy.mapping.ExportToJPEG(mxd, OutputJPGPath) arcpy.mapping.ExportToJPEG(mxd, OutputJPGPath, 'PAGE_LAYOUT', 0, 0, 200, "False", '24-BIT_TRUE_COLOR', 100)
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.