jbarrette-esristaff

Getting started with arcpy.mapping resources

Discussion created by jbarrette-esristaff Employee on Sep 29, 2011
Latest reply on May 15, 2015 by jkt5y
Getting started with Python map automation (arcpy.mapping)

ArcGIS 10 provides a new Python mapping module (arcpy.mapping) that allows you to interact with the contents of map documents and layer files without necessarily needing to interactively open an ArcMap session.  The methods, properties and functions available in this new map scripting API enable you, for example, to automate changing data sources, modify layer properties, export and print maps, as well as automate the creation of thematic maps and map series.  Because the new mapping module is part of the ArcPy geoprocessing framework, scripts can be used within ArcGIS Desktop but also published to ArcGIS Server as geoprocessing services making it much easier to make mapping and printing capabilities available on the server.

The following links are resources that will help you learn more about arcpy.mapping as well as sample scripts available for download:

Help Resources

�?� A new "Introduction to arcpy.mapping" help topic is a great starting point.  It includes links to a new arcpy.mapping tutorial and general guidelines for working with arcpy.mapping.  ArcGIS Desktop help has a complete section dedicated to the ArcPy mapping module.  Embedded within the help topics are over 100 different, practical help samples that can be copied/pasted into your applications.  Be sure to review the "Best ways to get started" section.

[INDENT]http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Introduction_to_arcpy_mapping/00s300000032000000/[/INDENT]
�?� A video presentation called �??Python Scripting for Map Automation in ArcGIS 10�?� presented at the 2011 Developer�??s Summit is an excellent starting point.  This presentation not only introduces arcpy.mapping but also demonstrates many of its use cases.

[INDENT]http://resources.arcgis.com/gallery/video/geoprocessing/details?entryID=E15FA297-1422-2418-A0B0-270A0BBB3E57[/INDENT]
�?� Another video presentation called "Arcpy.mapping: Export a map in PDF format from a web browser" that demonstrates how arcpy.mapping scripts can be published as geoprocessing services and published to web applications.
[INDENT]http://resources.arcgis.com/gallery/video/geoprocessing/details?entryID=4B0F346D-1422-2418-342A-026EA4547313[/INDENT]

Sample Applications

�?� Approximately 20 script tools that perform routine map and layer management tasks, printing and exporting, as well as basic cartographic operations.  This is an excellent download because it includes many practical code samples that perform a variety of tasks and they are easy enough to modify for your own purposes.
[INDENT]http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A910AB18-1422-2418-3418-3885D388EF60[/INDENT]
�?� A script tool that combines Data Driven Pages, arcpy.mapping, and the ReportLab site package to generate a reference map book that includes street index pages.  It demonstrates how arcpy.mapping can be used to extend Data Driven Pages capabilities.
[INDENT]http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=FBE3D235-1422-2418-8820-E071ED243854[/INDENT]
�?� A script that incorporates Data Driven Pages and arcpy.mapping to build a map series that includes dynamic graphic tables. There is a very complete README.doc file included with the download that also addresses other useful tips and tricks that go along with the application.
[INDENT]http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=8C8E6EB6-1422-2418-A0B8-6AA61BF57894[/INDENT]

Web Courses

�?� Basics of Python (for ArcGIS 10).  This course teaches fundamental concepts you need to know to create Python scripts in ArcGIS. You will learn guidelines for proper Python syntax, techniques to troubleshoot common errors, and how to use loops to test for conditions and execute different code based on the result.
[INDENT]http://training.esri.com/gateway/index.cfm?fa=catalog.webCourseDetail&courseid=2114[/INDENT]

�?� Python Scripting for Map Automation in ArcGIS 10. This course teaches how to automate map production and related data management tasks that would be time-consuming and tedious to perform manually. You will learn how to work with the mapping module of the ArcPy site package to quickly and easily update map layers and map document properties, modify map content, and produce individual maps and map books.
[INDENT]http://training.esri.com/gateway/index.cfm?fa=catalog.webCourseDetail&courseid=2054[/INDENT]



Jeffrey Barrette | Product Engineer

Outcomes