arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause) df.extent = lyr.getSelectedExtent() df.scale = df.scale*1.1 arcpy.AddMessage(str(whereClause)) cursor = arcpy.da.SearchCursor("Land", ["ValueGain"]) for row in cursor: arcpy.AddMessage(str(ValueGain)) del row del cursor
Solved! Go to Solution.
arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause) df.extent = lyr.getSelectedExtent() df.scale = df.scale*1.1 arcpy.AddMessage(str(whereClause)) cursor = arcpy.da.SearchCursor("Land", ["ValueGain"]) for row in cursor: arcpy.AddMessage(str(row[0])) # row[0] = first element of list that represents row del row del cursor
arcpy.AddMessage(str(ValueGain))
arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause) df.extent = lyr.getSelectedExtent() df.scale = df.scale*1.1 arcpy.AddMessage(str(whereClause)) cursor = arcpy.da.SearchCursor("Land", ["ValueGain"]) for row in cursor: arcpy.AddMessage(str(row[0])) # row[0] = first element of list that represents row del row del cursor
arcpy.AddMessage(str(ValueGain))
each row is returned as list of values