AnsweredAssumed Answered

Polygon Centroid

Question asked by jsmith0705 on Aug 9, 2013
Latest reply on Oct 15, 2013 by jsmith0705
I am attempting to create a script that zooms to a polygon centroid.  I want the polygon centroid to be based on a Subd attribute field.  Location is a feature class and I intend to use the SHAPE@XY to zoom to the polygon centroid.  I am receiving an RuntimeError: Invalid SQL statement.

centroid = "SHAPE@XY" spatialref = arcpy.Describe("Location").spatialReference cursor = arcpy.da.SearchCursor("Location", "Subd", centroid, spatialref)  row[0] = Subd del row del cursor

Outcomes