cfoster15

Using extents in python

Discussion created by cfoster15 on Aug 21, 2012
Latest reply on Aug 28, 2012 by cfoster15
I had a python script in ArcGIS 10, Python 2.6 that would get the extent of selected features and then zoom out from that exent.

In ArcGIS 10.1, Python 2.7 my script crashes at that point. 

arcpy.SelectLayerByAttribute_management(layer1, "NEW_SELECTION")
df.extent = layer1.getSelectedExtent(True)
arcpy.SelectLayerByAttribute_management(layer1,"CLEAR_SELECTION")
df.scale = df.scale * 1.4


Any help or suggestions would be greatly appreciated

Thanks,

Chad

Outcomes