I have this python program that creates line features in a line FC created by the program.
I also add the field to the FC called tao_name. When I set that field to the value I need it fails and the error says that tao_name is a read only attribute.
Here is the part where it errors out.
while sRow:
print cOwner, sRow.tao_name, SrcX, SrcY, Row
pt.id = Row
if cPrevO <> sRow.tao_name:
cPrevO = sRow.tao_name
#cOwner = sRow.tao_name
if cPrevO == sRow.tao_name and Row >= 2:
feat = iCur.NewRow()
DestX = sRow.CenX
DestY = sRow.CenY
pt.x = SrcX
pt.y = SrcY
lineArray.add(pt)
pt.x = DestX
pt.y = DestY
lineArray.add(pt)
feat.shape = lineArray
iCur.tao_name = sRow.tao_name ** Errors here
iCur.InsertRow(feat)
lineArray.RemoveAll()
SrcX = DestX
SrcY = DestY
cPrevO = cOwner
Row = Row + 1
sRow = sCur.Next()
lineArray.RemoveAll()
I have tried using setvalue and that didn't help
Thanks
Quinn