for row in sCur: geom = row.shape ext = geom.extent
arcpy.Describe("Layer").extent.xmin
arcpy.Describe("Layer").extent.XMin
searchRows = arcpy.da.SearchCursor("layer",["OID@","SHAPE@"]) for searchRow in searchRows: oidValue = searchRow[0] xminExt = searchRow[1].extent.XMin print "OID = " + str(oidValue) + " has an xmin extent of " + str(xminExt)
It is part of the geometry object and is definitely documented.
http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000070000000
>>> cur = arcpy.SearchCursor("Landscan_Sample") >>> for row in cur: ... print row.shape.extent.XMax ... -10.8041666667 -10.7958333333 -10.7875
Thanks for the pointer, but I cannot find any reference to .shape on the page you linked. There is no property of the Geometry class called 'shape'. So, as far as I can see, my original question stands: where is .shape documented?
Why does the following work, when the Row class doesn't even have a property called 'shape'? And why is there no object model diagram? It's so difficult to see how classes interact when you have to hop from one help entry to the other. We need a diagram to see how they fit together!>>> cur = arcpy.SearchCursor("Landscan_Sample") >>> for row in cur: ... print row.shape.extent.XMax ... -10.8041666667 -10.7958333333 -10.7875
geom = row.getValue('Shape')
There are two basic ways to get and set field values on a row:
Using the field name, as in value = row.road_type
Using getValue and setValue, as in value = row.getValue("road_type")
row.getValue(field)
row.field
row.shape.length