Include date labels

etta-drone
Dan Howe 5 years ago
parent 0568be834e
commit ca67fe493a

@ -88,6 +88,15 @@ def process(yaml_name):
arcpy.mapping.UpdateLayer(df, update_layer, symbology_layer, 'TRUE') arcpy.mapping.UpdateLayer(df, update_layer, symbology_layer, 'TRUE')
arcpy.RefreshTOC() arcpy.RefreshTOC()
# Update date text fields
for e in arcpy.mapping.ListLayoutElements(mxd, 'TEXT_ELEMENT'):
if e.text == '<before>':
t = params['PREVIOUS SURVEY DATE']
e.text = '{}-{}-{}'.format(t[:4], t[4:6], t[6:8])
elif e.text == '<after>':
t = params['SURVEY DATE']
e.text = '{}-{}-{}'.format(t[:4], t[4:6], t[6:8])
# Prepare output directories # Prepare output directories
datestr = re.search('\d+$', base_name).group() datestr = re.search('\d+$', base_name).group()
current_date = '{}-{}-{}'.format(datestr[:4], datestr[4:6], datestr[6:]) current_date = '{}-{}-{}'.format(datestr[:4], datestr[4:6], datestr[6:])

Loading…
Cancel
Save