lstFCs = arcpy.ListFeatureClasses("*", "Polyline") for fc in lstFCs: rows = arcpy.SearchCursor(fc) print fc for row in rows: type = row.Shape geom = str(type.centroid.X) truegeom = str(type.trueCentroid.X) if geom != truegeom: print row.ObjectID del row, rows
fclist = gp.listfeatureclasses("arc_test*") for fc in fclist: rows = gp.searchcursor(fc) row = rows.next() while row: typ = row.Shape geom = str(typ.centroid.X) print row.getvalue("OBJECTID"), geom truegeom = str(typ.truecentroid.X) print row.getvalue("OBJECTID"), truegeom row = rows.next()
for fc in lstFCs: rows = arcpy.SearchCursor(fc) print fc for row in rows: type = row.Shape geom = "%.4f" % type.centroid.X truegeom = "%.4f" % type.trueCentroid.X if geom != truegeom: print row.ObjectID del row, rows