Examples of using Model Only tools in ModelBuilder
To understand the use of the Collect Values tool in ModelBuilder, see the example below, where a new mosaic is created from 99 rasters stored in the ToolData workspace (the Input Rasters variable).The Iterate Rasters tool iterates through each of the rasters in the Input Rasters workspace, and all the rasters are collected using the Collect Values tool. The output of Collect Values, Collected Values, is a multivalue of rasters and is input to the Mosaic To New Raster tool.
Get Field Value
To understand the use of the Get Field Value tool in ModelBuilder, see an example below, where the model finds the percentage area of each polygon in a feature class.
The Input variable is a polygon feature class to the Summary Statistics tool, and the output Sum Area is a table with one record containing the total area of all polygons. This output is connected to the Get Field Value tool.
The Get Field Value tool gets the first value from a table of the specified field, and the value is then used as an in-line variable in the expression of the Calculate Field tool to find the percentage area of each polygon.
To understand the use of the Parse Path tool in ModelBuilder, see an example below, where the model parses the input (C:\Data\InputFC.shp) into the file, path, name, and extension. Path and name are used as inline variables in the output of the Copy tool.
To understand the use of the Select Data tool in ModelBuilder, see an example below, where the model copies two shapefiles to a geodatabase and merges one of these feature classes with another feature class. The Select Data tool is used to select one of the two feature classes in the geodatabase and pass it to the Merge tool.
The Stop tool stops the iteration of a model based on a condition. In the example, the For iterator has been used to iterate values from 500 to 4000 and incrementing by a value of 500. At the first iteration, the value is 500, then 1000, then 1500, and so on. This value is used as a buffer distance. The Summary Statistics tool is used to calculate the sum area of all the polygons, and Get Field Value is used to get the value from the summary statistics table. Calculate Value is used to calculate a Boolean true if the Sum Area value exceeds 40. The Stop tool is set to stop model execution if the condition set in Calculate Value is true. The model iterates for each value, and at the fourth iteration, in this example, the total area of all polygons exceeds 40, making the condition true. The Stop tool exits the model at this point.