AnsweredAssumed Answered

AttributeError: 'list' object has no attribute 'setValue' ?

Question asked by JB1234510 on Jan 28, 2015
Latest reply on Jan 28, 2015 by JB1234510

Don't know how to get rid of that message?

 

input_shp = fc
arr = arcpy.Array()  
with arcpy.da.UpdateCursor(input_shp,['FID','SHAPE@']) as cur:  
  extents = []   
  for row in cur:  
    ext = row[1].extent  
    p0 = ext.lowerLeft; p1 = ext.upperRight  
    print('Extent of shape... {}: '.format(row[0]))  
    print(' X min/max  {}, {}'.format(ext.XMin,ext.XMax))
    Xmin = round((ext.XMin), 0)
    print (Xmin)
    row.setValue(fld_xmin, Xmin)
    print ( ' X min, {}'.format(ext.XMin))
    curs.updateRow(row)
    print(' Y min/max  {}, {}'.format(ext.YMin,ext.YMax))  
    arr.add(p0)  
    arr.add(p1)  
mp = arcpy.Multipoint(arr)  
print('Extent of all {}'.format(mp.extent)) 

Outcomes