Guest User

Untitled

a guest
Dec 18th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. with arcpy.da.SearchCursor(fc, ("SHAPE@", "UNIQUE_ID")) as searchCur:
  2. for row in searchCur:
  3. myDF.extent = row[0].extent
  4. myDF.scale = mapScale
  5.  
  6. for elm in arcpy.mapping.ListLayoutElements(thisMap, "TEXT_ELEMENT"):
  7. elm.text = str(row[1])
  8.  
  9. arcpy.RefreshActiveView()
  10. arcpy.mapping.ExportToPDF(thisMap, str(pdfLoc) + "Map_" + str(row[1]) + ".pdf", resolution=300, image_quality="Best") #***test output location variable structure
  11. arcpy.AddMessage("Output ---> Map_" + str(row[1]) + ".pdf was created successfully!")
  12. arcpy.AddMessage(str(cycleCount) + "/" + str(recordCount))
  13. cycleCount += 1
  14.  
  15. for elm in arcpy.mapping.ListLayoutElements(thisMap, "TEXT_ELEMENT"):
  16. if elm.name == 'TestName' #reference by named element here
  17. elm.text = str(row[1]) #do work here
Add Comment
Please, Sign In to add comment