Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

exporting layout view in arcpy

$
0
0
Hi,

I am trying to export the layout view in arcmap by using the following script:

import arcpy
import os

mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Traffic Analysis")[0]
df.time.currentTime = df.time.startTime

while df.time.currentTime <= df.time.endTime:
# An example str(newTime) would be: "2008-12-29 02:19:59"
# The following line splits the string at the space and takes the first
# item in the resulting string.
fileName = str(df.time.currentTime).split(" ")[0] + ".jpg"
arcpy.mapping.ExportToJPEG(mxd, os.path.join(r"C:\Project\Output", fileName), df)
df.time.currentTime = df.time.currentTime + df.time.timeStepInterval
del mxd

This only exports the "data veiw" map but I want the "layout view"

Is python cabable of this....

I can set the mxd.activeView = 'PAGE_LAYOUT'
so when the mxd is opened it always opens to the page layout. I thougth that would allow images to export from that page but it
doesn't seem to be the case.

Is it possible??

Viewing all articles
Browse latest Browse all 2485

Trending Articles