I have got the folloving problem:I need to change some of the values of one attribute in my point shapefile. I want to do it in modelbuilder, but I dont know how. I have found a script which can do it in python. The script is as following:import arcpy
...
... features = arcpy.UpdateCursor(r"C:\Users\peter.valent\Documents\ArcGIS\Data\Vah po LM\test_points.shp")
... for feature in features:
... feature.precipitation = value
... features.updateRow(feature)
... del feature,features
This is what I put to modelbuilder:Expression:myfcn(r"%file_name%","%value%")
Code Block:import arcpy
def myfcn(path,value):
features = arcpy.UpdateCursor(path)
for feature in features:
feature.precipitation = value
features.updateRow(feature)
del feature,features