The Collect Values tool is designed to collect output values of an iterator or to convert a list of multivalues into a single input. The output of Collect Values can be used as input to tools such as Merge, Append, Mosaic, and Cell Statistics.
This tool is intended for use in ModelBuilder and not in Python scripting.
Tool outputs that are model parameters are added to the map display using the variable name. If you are using an iterator in the model and want to add the outputs of all the iterations to display in the map with the actual unique output name instead of the name of the variable, connect the output to be displayed to the Collect Value tool, right-click the output of Collect Value, and make it a model parameter.
Another use of the Collect Values tool is for removing output parameters from the tool dialog and still have the output added to the display. For example, suppose your model uses the Buffer tool and the output of Buffer tool is a model parameter. When you run your model from its tool dialog, the tool dialog displays this parameter and the user of your dialog can change the location where the output of Buffer is written. But what if you don't want the user of your dialog to change this location? That is, you want to write it to a specific location they cannot change.
The solution is to change the output of Buffer so it is not a parameter and connect the output to the Collect Values tool. Then make the output of Collect Values a model parameter. When the model is run from the tool dialog, the parameter is not displayed in the dialog and your user cannot change it. Yet, because it's an output parameter, it gets added to the map. (This works because, technically, the output of Collect Values is of type in-out derived data, and in-out derived data doesn't get added to the dialog.)
All the tools in ArcGIS are empty (without color) when added in a model except Collect Values and Merge Branch. Unlike other system tools, Collect Values is always in a ready-to-run state (colored in). This is because the input to Collect Values is a multiple value data type, and an empty multiple value is considered a valid input.
Input values to be collected.
- ArcGIS Desktop Basic: Yes
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes