Data Driven Process
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Thu Dec 20 16:03:52 EST 2012
On Thu, 20 Dec 2012 12:39:38 -0800, balparmak wrote:
> I am working with the python code below in ArcGIS to zoom into a
> shapefile's attribute table row features without selected until the end
> of table one by one.
>
> I am trying to use this code but this one requires that a row is
> selected.
Then select a row.
When you get an error message that tells you what is required, don't
argue with it, fix the problem that it tells you. If arcpy requires you
to select a row to work with, then you have to select a row to work with.
> import arcpy
> mxd = arcpy.mapping.MapDocument('CURRENT')
> df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
> df.zoomToSelectedFeatures()
How do you expect to zoom to selected features if you have no selected
features? Before this line, you need to select the feature you want to
zoom to.
> arcpy.RefreshActiveView()
>
> Any Help?
--
Steven
More information about the Python-list
mailing list