Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need some help. I am fairly new to Python. I found a sample code and I need to change a couple things in it for it to work. I need it to make sure that all PDFs were created from the Data Driven Pages program I have now. Reason is I sometimes have about 150 PDFs created from the DDP program. For Example : Houston has 152 pages in my mxd and DDP is supposed to make 152 pages. I've made some changes already to the code I was needing someone to double check my work.

import arcpy, os, sys
from os import path as p

#Make parameters for people to choose mxd and folder of PDFs to compare
mxdList = arcpy.GetParameterAsText(0).split(';')
pdf_path = arcpy.GetParameterAsText(1)
fc_path = arcpy.GetParameterAsText(2)

report = {}
page_list = []

#Use Search Cursor to go through Attribuite Table to get Sheet number info
for mapDoc in mxdList:
    mxd = arcpy.mapping.MapDocument(mapDoc)
for fcClass in fc_path:
    fc = arcpy.ListFeatureClasses()
            max_list = []
            rows = arcpy.SearchCursor(mxdList, "Sheet_ID")
            for row in rows:
                max_list.append(row.Sheet_ID)
                sheet_count = max(max_list)
                arcpy.AddMessage('Sheet count: {0}'.format(sheet_count))
            else:
                arcpy.AddError('No Layers in %s match data source'%mapDoc)
pdfDoc = arcpy.mapping.PDFDocumentOpen(path)
print pdfDoc.pageCount
share|improve this question
    
codereview.stackexchange.com –  RyanDalton Mar 5 '13 at 15:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.