laptop and a wrench

Bug

When run from the Python Window, layer.getSelectedExtent() crashes ArcMap.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM084055
SubmittedAugust 22, 2012
Last ModifiedApril 2, 2025
Applies toNo Product Found
Version found10.1
StatusDuplicate

Additional Information

NIM084005

Workaround

Instead of using the layer object to gather the extent, use the data frame properties by first zooming to the selected features then reading the extent of the data frame. For example:>>> map = arcpy.mapping.MapDocument("current")>>> df = arcpy.mapping.ListDataFrames(map)[0]>>> df.zoomToSelectedFeatures()>>> extent = df.extent>>> print extent

Steps to Reproduce

Bug ID: NIM084055

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options