jfield

Problem writing points with Python

Discussion created by jfield on Aug 15, 2011
Latest reply on Aug 15, 2011 by jfield
I have this code

It will execute the newRow, but errors with a 999999
When it tries to set the shape

# Open an insert cursor for the feature class
cur = arcpy.InsertCursor('Export_Output')
# Create array and point objects
ptList = [arcpy.Point(358331, 5273193)]
#arcpy.Point(358337, 5272830)]
lineArray = arcpy.Array(ptList)
# Create a new row for the feature class
feat = cur.newRow()
print 'newRow'
# Set the geometry of the new feature to the array of points
feat.Shape = lineArray
print 'Set geometry'
# Insert the feature
cur.insertRow(feat)
print 'Insert Row'
# Delete objec
del cur,feat

Outcomes