0

I have a python script that successfully runs from ArcMap 10.2. I was wondering if it would be possible to rewrite it so that it is a standalone script that prompts the user for the shapefile and then runs some analyses (e.g. buffer, tabulate intersection, intersect, etc.), changes layer's symbology properties using a preexisting lyr file, zooms to its extent, turns on and off other layers in the mxd TOC template depending on a specific conditions, changes the map title, and finally exports resulting map as a pdf.

The script is quite extensive and although much of the coding can be run as a standalone script, I am wondering if the section of the script dealing with manipulating the layout properties (legend, title) and the layers in the TOC as I want them to look so that I may create a map for exporting as a pdf can be done as a standalone script. It seems to me that some of these actions may only be possible inside an ArcMap session.

1 Answer 1

1

Have you seen arcpy.mapping?

Many of the things you're looking to accomplish can be done using this module (e.g. turning layers on and off, changing symbology, etc.). Have a look at the functions list.

However, the team at ESRI has stressed that they aren't trying to expose everything that's available in ArcObjects, so you may find things that you can't do.

Hope that helps,

DR

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.