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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.