Tag Info

New answers tagged

0

You need to make sure the pageNum is an int. Give this a try: import arcpy mxd = arcpy.mapping.MapDocument("E:\\User Folders\\Recreation.mxd") ddp = mxd.dataDrivenPages pageNumbers = raw_input("Enter Page/s: ") for pageNum in pageNumbers: ddp.currentPageID = int(pageNum) pageName = ddp.pageNameField.name a = ...


1

Not that I"m aware of, one quick alternative would be: Select Index layer features to exclude In attribute table, switch selection of features Use the Selected option for exporting pages See image below: You could add that idea here: ArcGIS Ideas


0

You have to remember (store in list) df.scale at each iteration. See if this will work import arcpy mxd = arcpy.mapping.MapDocument(r'd:\scratch\_wbench.mxd') df = arcpy.mapping.ListDataFrames(mxd)[0] listOfScales=[] goodScales=[50,100,200,500,1000,2000,5000,10000,500000] for i in range(1, mxd.dataDrivenPages.pageCount + 1): ...


0

Graph is a static thing, it won't auto-redraw. The best approach that works for me is to have graphics as attachments to DDPs. Yes, they have to be created first. This script below works with XY graph, which template saved in "vert_line.tee". After moving to next page I manually select points in the layer called 'pnts' in Table of Content. It has fields ...


0

So your problem looks two-fold. First part is you want to look for a way to do searching on file names with wildcards. I have an outline that I would follow, but I am assuming all your PDFs are in a centralized directory. First.. Get all the file names of the PDFs. You can use something like os.listdir() and then filter out the subdirectories (if they ...


1

This script works on current mxd: import arcpy, traceback, os, sys from arcpy import env env.overwriteoutput=True try: def showPyMessage(): arcpy.AddMessage(str(time.ctime()) + " - " + message) def isLayerExist (mxd,lName): layers = arcpy.mapping.ListLayers(mxd,lName) if len(layers)==0: raise NameError,'\n'+lName ...


4

This should be pretty doable using Extent objects. If you are using python to run your Data Driven Pages, why don't you calculate the extent of the data frame every time you change pages. Then, while that's going, calculate the geometry of your point layer. Use the contains method of the Extent object to determine whether the point is within the data ...



Top 50 recent answers are included