I am trying to create a button that will execute a Python script. I have limited Python experience. What we are trying to accomplish is to recreate these steps:
- Query on project Site and Radius Layers (both in an SDE)
- Zoom to the site
- Adjust scale to 10,500
I have pasted the code I wrote while trying to figure this all out, see below:
import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
df.zoomToSelectedFeatures()
df.scale = 10500
arcpy.RefreshActiveView()
This works, but is not anything that I can't do with ArcMap tools.