Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with arcpy.da.SearchCursor(fc, ("SHAPE@", "UNIQUE_ID")) as searchCur:
- for row in searchCur:
- myDF.extent = row[0].extent
- myDF.scale = mapScale
- for elm in arcpy.mapping.ListLayoutElements(thisMap, "TEXT_ELEMENT"):
- elm.text = str(row[1])
- arcpy.RefreshActiveView()
- arcpy.mapping.ExportToPDF(thisMap, str(pdfLoc) + "Map_" + str(row[1]) + ".pdf", resolution=300, image_quality="Best") #***test output location variable structure
- arcpy.AddMessage("Output ---> Map_" + str(row[1]) + ".pdf was created successfully!")
- arcpy.AddMessage(str(cycleCount) + "/" + str(recordCount))
- cycleCount += 1
- for elm in arcpy.mapping.ListLayoutElements(thisMap, "TEXT_ELEMENT"):
- if elm.name == 'TestName' #reference by named element here
- elm.text = str(row[1]) #do work here
Add Comment
Please, Sign In to add comment