ArcGIS ModelBuilder provides the user with a simple way to capture geoprocessing instructions as a Python script. This presentation explores the path to promote that script into formal production level code. Beginning with the geoprocessing foundation exported from ModelBuilder, we augment the code to:
• clarify the command line parameters
• organize the directories
• set the SDE workspace
• insert print commands
• check if feature classes exist
• use try / catch blocks to trap errors
• execute operating system commands
• add logging throughout the code
The end result of these additions is production level code that is easy to maintain and deploy. It is particularly well-suited to run automatically as a Windows Scheduled Task.
This session is intended for users who are getting started with Python, or even just thinking about it.