Summary
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.
Usage
This tool is intended for use in ModelBuilder and not in Python scripting.
Tool outputs with the Add To Display option checked are added to the display in ArcMap 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 ArcMap 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 check the Add To Display option. If the model will be run from the model tool dialog box, make the output of Collect Value a model parameter, since only the output model parameters are added to display.
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. You could change the model variable so it is not a parameter, but model variables are not added to the display unless they are parameters.
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 display. (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.)
Syntax
CollectValues_mb (in_value)
Parameter | Explanation | Data Type |
in_value | Input values to be collected. | Multiple Value |
Environments
This tool does not use any geoprocessing environments
Licensing Information
- ArcGIS for Desktop Basic: Yes
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes