Created
July 8, 2020 17:37
-
-
Save gavinr/bad230cfbe4894e507864b2e1a6a9afa to your computer and use it in GitHub Desktop.
Export an image (JPG) from an ArcGIS Pro project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First create an ArcGIS Pro Project, with at least one template, and put the | |
# name of it below. | |
import arcpy | |
TEMPLATE_NAME = "Square" | |
aprx = arcpy.mp.ArcGISProject("basic.aprx") | |
for lyt in aprx.listLayouts(): | |
if lyt.name == TEMPLATE_NAME: | |
# export! | |
print(f" {lyt.name} ({lyt.pageHeight} x {lyt.pageWidth} {lyt.pageUnits})") | |
lyt.exportToJPEG("out.jpg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment