I don't have any working cod, but I ran the following script and had problems. Every map document in the folder reverted back to 8 1/2 x 11 inch page sizes targeted to my default printer. I lost all my large-format printer settings and had to reposition and resize every element in the layout view, causing me to redo hours of work done over the last few days. Yes, I should have tried with only one map document as a test, but it's a hard less to relearn.
import os import os.path import arcpy.mapping mapFolder = os.curdir for mapDoc in os.listdir(mapFolder): if os.path.splitext(mapDoc)[1] == '.mxd': mapPath = os.path.join(mapFolder, mapDoc) print 'Regenerating thumbnail for ' + mapPath + '...' mxd = arcpy.mapping.MapDocument(mapPath) mxd.deleteThumbnail() mxd.makeThumbnail() 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.