Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Wednesday, August 23, 2017

Using Microsoft Access to Track Tasks

Earlier this year I experienced an increase in workload, as I took on a more central roll in developing GIS solutions and project support within my company.

To deal with the increasing number of requests for GIS support I was receiving, I wanted to set up a GIS Task Tracker database/spreadsheet that I could use to easily input and track requests.  In addition, I would have a number of other GIS staff assisting with the project, so I felt task management would need to take center stage if the project was going to continue running smoothly.

I began with a template in Excel, but it quickly became clear that this approach wouldn't work....our spreadsheet became riddled with errors and many staff were forgetting to enter tasks.  I decided to scrap my original Excel document and use an Access database, in part because of a number of benefits I saw:

     1.  Access could be easily linked to our Outlook accounts.
     2.  Tasks could be directly e-mailed to GIS staff through this Outlook connection.
     3.  A task form could be utilized, for easily entering accurate task information.
     4.  GIS staff could quickly and easily communicate with project staff with regard to time frames and workload issues.
     5.  Attachments could be added to each individual request.
     6.  Finally, Excel is ultimately a tool for small scale data analysis.  It became clear that Access was the right tool for this complex data management/storage task.....perfect for this exercise.

In my research, I was fortunate to find an (almost) perfect template developed by Microsoft here:

https://support.office.com/en-us/article/Use-the-Task-Management-Access-Database-template-50376839-8cc6-4d29-ac1b-b9fce69605f8


The original template wouldn't need much editing on my end, just a few extra fields and changes to the primary form used for adding new tasks:
View of the task tracker in Access


Adding tasks in the table view was simplified with the creation of an entry form:
View of the Entry Form


With the Task Tracker in place, my workload became much more manageable and allowed me to generate queries and reports detailing the influx of recent requests.  I would highly recommend this database template for anyone looking to manage GIS requests within a medium or even large GIS work group.

Thursday, August 17, 2017

Exporting Maps to PDF with Python

Recently, I had the need for a python script that would export a series of maps to PDF.

I wanted to set up a task using Python and Task Scheduler, that would access a workspace location and export every .mxd at that location to PDF at a specific time during the evening.

I began with a script I found here:  http://support.esri.com/en/technical-article/000012420

I ended up with a slightly modified script, as shown below:

_________________________________________________________
#Import modules here
import arcpy, os

print ('Hello, finding workspace now...')

#Set workspace location here
arcpy.env.workspace = ws = r"C:\Test"

print ('Finding .mxd files now...')

#Create list of .mxd files within the workspace.
mxd_list = arcpy.ListFiles("*.mxd")

print ('Exporting to PDF now...')

for mxd in mxd_list:
   
    current_mxd = arcpy.mapping.MapDocument(os.path.join(ws, mxd))
    pdf_name = mxd[:-4] + ".pdf"
    arcpy.mapping.ExportToPDF(current_mxd, pdf_name)

print ('Complete, thank you for using Map Exporter!')
__________________________________________________________


Next, I needed to set the script to run at a specific time. 

To accomplish this, I started by opening Task Scheduler from the Windows Start Menu.

Next, I ran through the following steps:

1. Create a Basic Task
2. Start Daily
3. Run time 10 p.m., recurring daily
4. Action = Start a program
5. Select location of script


Now, I have a nice, tidy, fairly simple map exporter that will run every night at 10 p.m. 

Additional information on utilizing the Task Scheduler is here:    https://blogs.esri.com/esri/arcgis/2013/07/30/scheduling-a-scrip/




Work in Progress - Disputed Areas Map

I started this project as a fun change of pace from my normal GIS day-to-day, and as a way of brushing up on my cartography skills. For me,...