arcpy.CalculateField_management(ModelAirports_shp__12_, "Zoom", "calcZoom(!FlDaily!, !UseType!, !Part139!, !OEP35!, !Core30!, !Type!)", "PYTHON_9.3", "def calcZoom(flights, use, part139, oep35, core30, type):\\n if (oep35 == 1) or (core30 == 1):\\n return 10000000\\n elif ((oep35 == 0) and (core30 == 0) and (part139 == 1) and (type == \"AIRPORT\") and (use == \"Public\")):\\n return 262144\\n elif ((oep35 == 0) and (part139 == 1) and (type == \"AIRPORT\") and (use == \"Private\")):\\n return 262144\\n elif ((part139 == 1) and (oep35 == 0) and (type == \"AIRPORT\") and (use == \"Military\")):\\n return 262144\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Public\") and (flights >= 250)):\\n return 131072\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Military\") and (flights >= 100)):\\n return 131072\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Public\") and (flights < 250) and (flights >= 100)) :\\n return 65536\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Private\") and (flights >= 100)):\\n return 65536\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Military\") and (flights < 100)):\\n return 65536\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Public\") and (flights < 100)):\\n return 32768\\n elif (((type == \"SEAPLANE BASE\") or (type == \"GLIDERPORT\") or (type == \"ULTRALIGHT\") or (type == \"BALLOONPORT\")) and ((use == \"Public\") or (use == \"Private\"))):\\n return 32768\\n elif ((part139 == 0) and (type == \"AIRPORT\") and (use == \"Private\") and (flights < 100)):\\n return 32768\\n elif ((type == \"HELIPORT\") and ((use == \"Public\") or (use == \"Military\"))):\\n return 16384\\n elif ((type == \"HELIPORT\") and (use == \"Private\")):\\n return 8192\\n else:\\n return 0")
arcpy.CalculateField_management(ModelAirports_shp__12_, "Zoom", "calcZoom(!FlDaily!, !UseType!, !Part139!, !OEP35!, !Core30!, !Type!)", "PYTHON_9.3", calcZoom(!Airports!, !Use!)
Solved! Go to Solution.
param1 = function1("some text") param2 = function2("some other text", somevariable) saveLoc = r"o:\some\savelocation\path" arcpy.SomeTool(param1, param2, saveLoc)