I am trying to run a script outside of arc map I want the python script to zoom to selected features.
The following code works great inside of python but not outside of python.
mxd = arcpy.mapping.MapDocument("C:/Users/hchapa.LRGVDC911.000/Desktop/test.mxd")
dataframe = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
dataframe.zoomToSelectedFeatures()
arcpy.RefreshActiveView()
I want this code to run outside of arc map.
I had an idea using add ins but that still running inside of arc map.
Is there a way to launch a script outside and changing the view on a current open mxd file.
The following code works great inside of python but not outside of python.
mxd = arcpy.mapping.MapDocument("C:/Users/hchapa.LRGVDC911.000/Desktop/test.mxd")
dataframe = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
dataframe.zoomToSelectedFeatures()
arcpy.RefreshActiveView()
I want this code to run outside of arc map.
I had an idea using add ins but that still running inside of arc map.
Is there a way to launch a script outside and changing the view on a current open mxd file.