I have a very simple model that selects an attribute by a layer and counts the rows of that attribute type. I would like to use the calculate value tool to make a boolean true and false out puts. Just to check if the value is greater than X else less than X.
expression: oneOrTwo(r"%RSL%") # code block - note converting result to integer import arcpy def oneOrTwo(ds): # In python you need to unpack count from result object numsel = int(arcpy.GetCount_management(ds).getOutput(0)) if numsel == 0: numsel = 1 else: numsel = 2 return numsel
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.