Two searchcursors and updatecursor in feature table

Discussion created by Liberator on Feb 25, 2013
Latest reply on Feb 25, 2013 by mzcoyle
I have started looking at Python in Arcgis.
My aim is to build water hydraulic model from digital cadastre using model builder.

Water cadastre is broken into many small pieces.
Each sector (pipe) has attributes about the type of distribution, material, profil, age, etc., but not all.
Some pipes are without any attibuttes. Their reocords have no data.

So I have pipes and numerated nodes for these pipes. Each pipe has in his table  FROM NODE and TO NODE number.
I would like to write code in Python which would fill no data cells (NN,0 ) in table:
Each pipe without attributes would acquire attributes from previous pipe the same type with attributes.
I think i will have to repeat that process many times.

Table structure:

  1. select pipes ID = PK and OZN_KAT = NN

  2. find FROM NODE for that pipe

  3. find TO NODE = FROM NODE for previous pipe

  4. copy [OZN_KAT], [MATERIAL], [PROFIL], [LETO_VGR] from previous pipe to desired pipe.

Can you give me a clue how to do that? Or something more.
I would like to use code first in Python and then also in calculate value toolbox.