I am making a python code for arcgis 9.3. In this code i create a new point with x,y and z attributes as following :
rowsLine = gp.updatecursor(line_Feature_Class)
rowLine = rowsLine.next()
rowsPoint = gp.InsertCursor(point_Feature_Class)
feat = rowsPoint.NewRow()
while rowLine:
#...
ptObj = gp.CreateObject('Point')
ptObj.x = xPremierPoint
ptObj.y = yPremierPoint
ptObj.z = zPremierPoint
feat.Shape = ptObj
rowsPoint.InsertRow(feat)
I want to add the z value in a field "zvalue" in my "point_Feature_Class". The problem is i can't use an insert cursor (rowsPoint) and an update cursor at the same time.
So, at the end of the code, I want to delete the insert cursor, create an upsdate cursor, to loop in my "point_Feature_Class" and get the z attribute of each point and add it in the fiels "zvalue".
The code should be something like that :
rows = gp.updatecursor(point_Feature_Class)
row = rows.next()
While row :
Zvalue = #???? row.shape.getz ????
row.SetValue("zvalue", Zvalue)
rows.updateRow(row)
row = rows.Next()
Thanks for your help ;)