Guest User

Untitled

a guest
Sep 26th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. for pnt_id in UNIQUE_POINT_IDS:
  2. for export_lyr in arcpy.mapping.ListLayers(MXD, '', DF):
  3. if pnt_id in export_lyr.name and 'traffic' in export_lyr.name:
  4. arcpy.SelectLayerByAttribute_management(export_lyr, "NEW_SELECTION", '"ToBreak"=10')
  5. print 'zooming to map extent for', pnt_id, '...'
  6. DF.zoomToSelectedFeatures()
  7. print 'clearing selected features before map export...'
  8. arcpy.SelectLayerByAttribute_management(export_lyr, "CLEAR_SELECTION")
  9. arcpy.RefreshActiveView()
  10. MXD.save()
  11. PNG_PATH = os.path.join(r'D:tempautosample_data_20160916',
  12. export_lyr.name + '.png')
  13. print 'exporting', export_lyr.name, 'to PNG...'
  14. arcpy.mapping.ExportToPNG(MXD, PNG_PATH)
Add Comment
Please, Sign In to add comment