I am a little stuck with a relatively simple model.
What I want:
1) Create a table "results".
2) Loop over "Points".
3) Do some buffer and counting
4) Put the results (OBJECTID and count) into "results" via "addRecord"
5) Goto 2
What it does: 1) -> 2) -> 3) -> 4) and then it creates "results" again which somehow empties results.
Any hints ?
addRecord looks like this:
import arcpy
infile = arcpy.GetParameterAsText(0)
IDFieldValue = long(arcpy.GetParameterAsText(1))
CountFieldValue = arcpy.GetParameterAsText(2)
rows = arcpy.InsertCursor(infile)
row = rows.newRow()
row.setValue("OID", IDFieldValue)
row.setValue("count", CountFieldValue)
rows.insertRow(row)
del row
del rows