AnsweredAssumed Answered

[B]Update subtype field with arcpy.da.updateCursor()[/B]

Question asked by topo_geo on Oct 22, 2013
Latest reply on Oct 22, 2013 by topo_geo
hello
i try to update a subtype field (integer) from the value of an other field with arcpy.da.updateCursor() but dosen't work.

please some idea

axeceau = "RHAXECEL" # the feature class fields = ['CODHYDRO', 'TYPECEAU'] # TYPECEAU is the subtype field with arcpy.da.UpdateCursor(axeceau, fields) as cursor8:     for row in cursor8:         if row[0] == 3:             row[1] = 4         elif row[0] == 4:             row[1] = 1         elif row[0] == 5:             row[1] = 1         else:             row[1] = 1         cursor8.updateRow(row) 

Outcomes