Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for pnt_id in UNIQUE_POINT_IDS:
- for export_lyr in arcpy.mapping.ListLayers(MXD, '', DF):
- if pnt_id in export_lyr.name and 'traffic' in export_lyr.name:
- arcpy.SelectLayerByAttribute_management(export_lyr, "NEW_SELECTION", '"ToBreak"=10')
- print 'zooming to map extent for', pnt_id, '...'
- DF.zoomToSelectedFeatures()
- print 'clearing selected features before map export...'
- arcpy.SelectLayerByAttribute_management(export_lyr, "CLEAR_SELECTION")
- arcpy.RefreshActiveView()
- MXD.save()
- PNG_PATH = os.path.join(r'D:tempautosample_data_20160916',
- export_lyr.name + '.png')
- print 'exporting', export_lyr.name, 'to PNG...'
- arcpy.mapping.ExportToPNG(MXD, PNG_PATH)
Add Comment
Please, Sign In to add comment