Export pdf from mulitple bookmarks?

1744
2
08-23-2012 11:10 PM
KarinHenrikson
New Contributor II
Hi,
I am looking for an automatic way to export maps from differens bookmarks.
I would be great with some kind of dynamic text as well, but its not necessary.

I know the Data Driven pages exist, I have used it a lot, sometimes it would be a lot better to use bookmarks exent instead.

I did find this script, but it´s for version 9.3.1: http://arcscripts.esri.com/details.asp?dbid=15752

I am using 10.0.

I would be greatful for any help!
Thanks,


Karin Henrikson
WSP Sweden
0 Kudos
2 Replies
JohnSobetzer
Frequent Contributor
Edit:    Now I see there is a post just following yours that includes this entire thread that this code came from.  Check it out.

This code came from J Barrette of ESRI on another Forum post.  It exports bookmarks to jpg files but with some tweaking you might be able to get it to do what you want.  But it may only be available in 10.1?

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Transportation")[0]
for bkmk in arcpy.mapping.ListBookmarks(mxd, data_frame=df):
    df.extent = bkmk.extent
    outFile = r"C:\Project\Output\\" + bkmk.name + ".jpg"
    arcpy.mapping.ExportToJPEG(mxd, outFile, df)
del mxd
0 Kudos
JeffBarrette
Esri Regular Contributor
Yes, arcpy.mapping.ListBookMarks was added to the API at 10.1.

Jeff
0 Kudos