startch0

How to assign variables to values inside fields.

Discussion created by startch0 on Apr 9, 2013
Latest reply on Apr 9, 2013 by startch0
Hello,

I want to assign variables to values inside fields.

There is one example of a script that retrieve values from a field and print them in the console. I need something like that but for get this values in different variables.

Thank you

import arcgisscripting
i = arcgisscripting.create(10.1)

rows= i.searchcursor("C:/test/testline.shp","","","FID,Id","")
row = rows.next()
currentstate = ""
while row:
    if currentstate != row.FID:
        currentstate = row.FID

        print (row.Id,row.FID)
    row = rows.next()

Outcomes