Graphic Table Elements in Data Driven Pages

1250
2
03-15-2011 12:20 PM
AllisonMuise
New Contributor III
Hello!

I have built a mapbook using DDP and my layout includes a graphic table element (Production Mapping) that shows information about the features on each page. The table updates correctly if I flip through the pages in ArcMap, but when I export the pages to pdf individually the table remains static- showing only the information for the first page of the document on every page without updating.

I have tried exporting pages individually and as a book from a stand-alone script, the python window, and File-Export and the results are the same.

Does anyone have any suggestions for making the table update as each page is exported?

Thanks!
Allison
0 Kudos
2 Replies
DanHopkins
Esri Contributor
Thank you for bringing this issue to our attention.

I think you have encountered the following defect:

Bug: 2650
Title: GTE table information is incorrect for each data driven page when exporting to PDF

Bug: 2650 has been fixed, tested, and released into SP1 for Esri Production Mapping 10. Have you downloaded and installed SP1 for Esri Production Mapping 10?
0 Kudos
AllisonMuise
New Contributor III
Thanks!

After installing SP1 export now works from the file menu!

Unfortunately, the table still doesn't update when I export from a script. As each page exports I need to update a selection and reposition some features. My mapbook is 104 pages long so automation would be a good thing!  Perhaps it's something in my script? Here's my code:

import arcpy
from arcpy import env
from arcpy import mapping

env.overwriteOutput = True

mxd = arcpy.mapping.MapDocument(r"H:\SableIsland\Documents\SIVegAtlas.mxd")

# Identify Layout elements
LE = arcpy.mapping.ListLayoutElements(mxd,"GRAPHIC_ELEMENT","Table1")[0]
WB = arcpy.mapping.ListLayoutElements(mxd,"GRAPHIC_ELEMENT","WhiteBar")[0]
H1 = arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT","Head_1")[0]
H2 = arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT","Head_2")[0]
H3 = arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT","Head_3")[0]
H4 = arcpy.mapping.ListLayoutElements(mxd,"TEXT_ELEMENT","Head_4")[0]
    
ddp = mxd.dataDrivenPages

for pageNum in range(1, 5):

    mxd.dataDrivenPages.currentPageID = pageNum

    df = arcpy.mapping.ListDataFrames(mxd, "Panel")[0]

    # Refresh Pie Chart data
    parcelLayer = arcpy.mapping.ListLayers(mxd, "*Graph", df)[0]
    where = "\"Name2\" = " + str(pageNum)
    arcpy.SelectLayerByAttribute_management(parcelLayer, "NEW_SELECTION", where)

    # Re-position elements to fit new GTE 
    WB.elementPositionY = LE.elementPositionY + (LE.elementHeight/2) - .45
    H1.elementPositionY = WB.elementPositionY   
    H2.elementPositionY = WB.elementPositionY
    H3.elementPositionY = WB.elementPositionY 
    H4.elementPositionY = WB.elementPositionY

    # Export
    r = str(pageNum) + "-" + str(pageNum)
    pdf = r"C:\Users\Allison\Desktop\DigitalAtlas\VegAtlas" + str(pageNum) + ".pdf"
    ddp.exportToPDF(pdf,"RANGE",r)

mxd.save()
del mxd


Any suggestions?
0 Kudos