How can I make sure the MapDocument goes to full extent before I export?
mxd = arcpy.mapping.MapDocument(PathToMXD) df = arcpy.mapping.ListDataFrames(mxd, "myDataFrame")[0] lyr = arcpy.mapping.ListLayers(mxd, "myRasterLayer")[0] df.extent = lyr.getExtent()
import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Transportation")[0] arcpy.mapping.ExportToTIFF(mxd, r"C:\Project\Output\ProjectDataFrame.tif", df, df_export_width=1600, df_export_height=1200, geoTIFF_tags=True) del mxd
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.