I`m using ArcMap 10.2.2 and Python 2.7.5
I´m tryig to calculate values with the CalculateField_management tool.
my script:
def mthree(mthre, mtwo): if mthre >= 1: return -3 if mtwo >= 2: return -5 else: return Nonetry: arcpy.CalculateField_management(FC, "EPK_Gesamt", mthree("countmd","countmz"),"PYTHON_9.3") print "done" The Problem:It writes in every row the same value (-3)However if I do the same calculation within the Field Calculator it works great!Has anyone an Idea what I´m doing wrong?Thx
أكثر...
I´m tryig to calculate values with the CalculateField_management tool.
my script:
def mthree(mthre, mtwo): if mthre >= 1: return -3 if mtwo >= 2: return -5 else: return Nonetry: arcpy.CalculateField_management(FC, "EPK_Gesamt", mthree("countmd","countmz"),"PYTHON_9.3") print "done" The Problem:It writes in every row the same value (-3)However if I do the same calculation within the Field Calculator it works great!Has anyone an Idea what I´m doing wrong?Thx
أكثر...