diff --git a/plot_heatmaps.py b/plot_heatmaps.py index 103e6de..d1c0422 100644 --- a/plot_heatmaps.py +++ b/plot_heatmaps.py @@ -88,6 +88,15 @@ def process(yaml_name): arcpy.mapping.UpdateLayer(df, update_layer, symbology_layer, 'TRUE') arcpy.RefreshTOC() + # Update date text fields + for e in arcpy.mapping.ListLayoutElements(mxd, 'TEXT_ELEMENT'): + if e.text == '': + t = params['PREVIOUS SURVEY DATE'] + e.text = '{}-{}-{}'.format(t[:4], t[4:6], t[6:8]) + elif e.text == '': + t = params['SURVEY DATE'] + e.text = '{}-{}-{}'.format(t[:4], t[4:6], t[6:8]) + # Prepare output directories datestr = re.search('\d+$', base_name).group() current_date = '{}-{}-{}'.format(datestr[:4], datestr[4:6], datestr[6:])