AnsweredAssumed Answered

Python arcpy.da.InsertCursor  how to create a newRow()

Question asked by jsn on Mar 4, 2016
Latest reply on Mar 6, 2016 by lpinner

Hello everyone

 

I am converting a arcpy.InsertCursor  in arcpy.da.InsertCursor

How does this line works in arcpy.da.InsertCursor

 

  row = rows.newRow()

 

 

# Create insert cursor for table

rows = arcpy.InsertCursor("c:/base/data.gdb/roads_lut")

 

# Create 25 new rows. Set the initial row ID and distance values

for x in range(1, 26):

    row = rows.newRow()

    row.setValue("rowid", x)

    row.setValue("distance", 100)

    rows.insertRow(row)

Outcomes