TitlePages

Thursday 20 November 2014

Feature Count using Model Builder

Software Required:
  1. ArcMap 10.2 or more


Procedure:
  • Open ArcMap 10.2+ 
  • Goto Window > Show ArcCatalog
  • ArcCatalog Right Click on the Default GeoDatabase and Create New Feature Class.Give a name for the new feature class and Click Finish
  • Add a New Model to the Database New > Model Tool after creating a New ToolBox
  • Add Get Count and Calculate Value to the New Model
  • Set GetCount Ouput Value as  the Precondition for Calculate Value
  • Add the following procedure for the Calculate value Model






Expression

CountMe(%RowCount%)

Code Block
def CountMe(n):
  if n > 0: 
     return "true" 
  else: 
     return "false"



The Output of the Calculate Value Model is Boolean(True or False).Setting the output value of Calculate Value as the Precondition for the desired Model will make it model to run only when the output is True

No comments: