from os import path import arcpy # These are the ones edited most often # Whether or not the script is being developed on this machine DEV = False # The directory of the installed process base_dir = 'C:\\GIS\\ScheduledTasks\\HydrantMaps' # The directory where the PDFs and Excel files will export pdf_export_dir = 'C:\\GIS\\ScheduledTasks\\HydrantMaps\\PDF' # The directory where the exported files will be copied to when finished destination_dir = '\\\\stpLadderFR\\FireHydrants' # Derived variables temp_gdb_name = "TempData" temp_gdb_path = path.join(base_dir, temp_gdb_name + ".gdb") pdf_temp_dir = path.join(pdf_export_dir, "pdf_temp") template_dir = path.join(base_dir, "MxdTemplates") cover_mxd_path = path.join(template_dir, "Cover.mxd") index_mxd_path = path.join(template_dir, "MapIndex.mxd") dispatch_mxd_path = path.join(template_dir, "DispatchArea.mxd") dispatch_mxd = arcpy.mapping.MapDocument(dispatch_mxd_path) dispatch_df = dispatch_mxd.activeDataFrame dispatch_grid = arcpy.mapping.ListLayers(dispatch_mxd, "Fire Dispatch Grid", dispatch_df)[0] dispatch_fire_boundaries = arcpy.mapping.ListLayers(dispatch_mxd, "Fire Boundaries", dispatch_df)[0] cover_mxd = arcpy.mapping.MapDocument(cover_mxd_path) index_mxd = arcpy.mapping.MapDocument(index_mxd_path) index_df = index_mxd.activeDataFrame index_dispatch = arcpy.mapping.ListLayers(index_mxd, "Fire Dispatch Grid", index_df)[0] index_fire_boundaries = arcpy.mapping.ListLayers(index_mxd, "Fire Boundaries", index_df)[0]