Data Driven Process

balparmak at gmail.com balparmak at gmail.com
Thu Dec 20 16:21:54 EST 2012


On Thursday, December 20, 2012 2:03:52 PM UTC-7, Steven D'Aprano wrote:
> 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

what I am thinking is that I can specify the first layer(mapindex shapefile) in the table of contents (using ArcGIS 10) and then specify the row of that attribute table(mapindex's). Create loop to go through the attribute table's record until the end of it.

Thanks again,



More information about the Python-list mailing list