My script geterates two lines in a temp shapefile.
I'm then using SearchCursor and Describe to get the lengths of these lines, like this:
rows = arcpy.SearchCursor(tempSHP)
len = 0
shapeName = arcpy.Describe(tempSHP).shapeFieldName
for row in rows:
feat = row.getValue(shapeName)
len = feat.length
print len
What I really want is to set the length of each line to a different variable - I tried various things like below but haven't found the right way to approach this little problem (the error for the code below said "row does not support indexing"):
for row in rows:
featX = row[0].getValue(shapeName)
lenX = featX.length
featY = row[1].getValue(shapeName)
lenY = featY.length