Note:
ModelBuilder is currently in beta. Share your experience and seek support through the forums available in the ModelBuilder Early Adopter Community.
A model is composed of model elements that are connected to form processes.
You can add analysis tools and data to a model; connect them to each other; and modify the elements' size and position.
Note:
ModelBuilder does not support copying and pasting tool or data elements, including using Ctrl+C, Ctrl+X, and Ctrl+V keyboard shortcuts.
Add tools
Map Viewer analysis tools are added to the model and chained together to form a complete workflow.
Complete the following steps to add tools to a model:
- Complete the steps to open a model, connect to an analysis session, and activate the model if necessary.
- Click Add tools .
The Add tools window appears showing a list of supported tools.
Note:
If Add tools is not available, it may mean that you are not connected to an analysis session or the model is not active.
- Click a tool name to select it, using the search bar if necessary to search by name or keyword. You can select more than one tool at a time.
- Click Add.
The selected tools and their outputs are added to the ModelBuilder diagram.
Supported tools
Most feature analysis tools are supported to add to a model. Additional tools will be supported in future releases.
The following feature analysis tools are currently supported: Aggregate Points, Calculate Composite Index, Calculate Density, Create Buffers, Create Viewshed, Create Watersheds, Dissolve Boundaries, Find Centroids, Find Hot Spots, Find Outliers, Find Point Clusters, Find Similar Locations, Generate Tessellations, Interpolate Points, Join Features, Merge Layers, Overlay Layers, Summarize Center and Dispersion, Summarize Nearby, Summarize Within, and Trace Downstream.
The following feature analysis tools are not currently supported to add to a model: Calculate Travel Cost, Choose Best Facilities, Enrich Layer, Extract Data, Find by Attributes and Locations, Find Closest, Generate Travel Areas, and Plan Routes. Summarize Nearby does not support using a travel mode when run from a model. Find Hot Spots and Find Outliers do not support using Esri population data.
Raster analysis tools are not currently supported to add to a model.
Add data
Data can be added directly to the model diagram or from a tool dialog.
When you add data to a model, an input data variable element is created and can be used as an input to an analysis tool.
Note:
Adding data to a model does not add the data to the map.
If a layer from the map with a filter applied is used in the model, the filter is honored in the analysis. Selections on map layers are not honored.
If a layer with a filter is removed from the web map before the model is run, the full dataset is used for analysis.
Add a layer from the map
Complete the following steps to add a layer from the map to a model:
- Complete the steps to open a model, connect to an analysis session, and activate the model if necessary.
- Click Add data on the action toolbar.
The Add data window appears with options to add a layer from the map or browse layers.
Note:
If Add data is not available, it may mean that you are not connected to an analysis session or the model is not active.
- Click Add layer from map.
A list of supported layers from the current web map appears.
- Select the layers to add to the model.
- Click Confirm.
The layers are added as input data variable elements to the ModelBuilder diagram.
Browse for data
Complete the following steps to add data to a model:
- Complete the steps to open a model, connect to an analysis session, and activate the model if necessary.
- Click Add data on the action toolbar.
The Add data window appears with options to add a layer from the map or browse layers.
Note:
If Add data is not available, it may mean that you are not connected to an analysis session or the model is not active.
- Click Browse layers.
The layers from My content appear.
- Click My content and choose a different option from the menu (for example, My groups or My organization) if necessary.
- Use the Search bar or Sort by menu to reduce the number of items or reorder the list of items if necessary.
- On the desired item, click Select layers, then choose one or more layers from the menu.
- Click Confirm.
The layers are added as input data variable elements to the ModelBuilder diagram.
Add data in a tool dialog
Complete the following steps to add data through an analysis tool:
- Complete the steps to open the ModelBuilder (Beta) pane and add tools, if necessary.
- Select a tool element and click Open on the element toolbar, or double click the tool element to open it.
Note:
If the tool cannot be opened, it may mean that you are not connected to an analysis session or the model is not active.
- Click the Layer button for the input parameters to select an input layer. If the input layer has not been added to the map, complete the following steps:
- Click Browse layers.
The Select layer window appears showing layers from My content.
- Click My content and choose a different option from the menu (for example, My groups or My organization) if necessary.
- Use the Search bar or Sort by menu to reduce the number of layers or reorder the layers if necessary.
- On the desired item, click Select layer, and choose a layer from the menu.
- Click Confirm.
- Click Browse layers.
- Repeat the previous step for any additional input parameters.
- In the tool pane, click Confirm.
The layers are added as tool inputs and as input data variables in the ModelBuilder diagram.
Supported data
The following data types are supported as inputs to analysis tools in ModelBuilder:
- Hosted feature layers
- Hosted tables
Sketch layers are not supported as inputs. The Draw input features button is not available in ModelBuilder.
Note:
If you are using duplicated layers in your analysis, it is recommended that you apply a filter to the duplicate layers before adding them to the model from the tool dialog or using Add layer from map.
Connect data and tools
Once you've added data and tools to a ModelBuilder diagram, you can connect them to create an analysis workflow. Connectors can be added either by drawing directly in the diagram, or through a tool dialog.
Complete the following steps to draw a connection between data and tool elements:
- Complete the steps to open a model and add data and tools if necessary.
- Click the port on the right side of a data element and drag it to the port on the left side of a tool element.
The parameters requiring input layers are listed below the tool element.
- Click the name of the parameter in which the layer will be used (for example, Input layer).
A connector appears between the data element and the tool element, and the tool validates. The layer name will appear for the specified parameter when the tool dialog is opened.
Set tool parameters
Tools have parameters that can be updated to specify how the tool runs.
Complete the following steps to set tool parameters:
- Complete the steps to add tools to a model if necessary.
- Do one of the following:
- Double click the tool element.
- Select the tool element and click Open on the element toolbar.
The tool dialog appears.
- Update the tool parameters.
Required parameters are indicated with a red dot. If you drew a connection between a data variable and the tool, the input layer will already be listed in the dialog.
As the tool parameters are set, each parameter automatically validates the data or value that is specified. If the data or value is invalid, an error message appears.
Tip:
Click the help icon beside a parameter to view the help. You can also click Learn more to open the help topic.
If it is the last tool in the model or you want to visualize the results of the tool on the map, choose Create new hosted layer in the Result layer parameter group.
- Click Confirm.
The tool dialog closes and the tool validates. To close the dialog without applying the changes, click Cancel or close .
Validate tools and data
Validation is the process of checking that data exists and tools have been configured to meet all requirements necessary to run them. Validation happens automatically when you add data and tools to the model, change tool parameters, and open models. As tool and data elements in the model are validated, the element style updates to show their current state.
Learn more about diagram element states
Validation occurs for input data variables, tools, and output data variables.
Input data variables
When a data variable is added to a model diagram, the variable validates automatically and turns blue. If the data was added using the Add layers from map option, the data will validate when a filter is applied to the map layer.
Tools
When a tool is added to a model diagram, the tool and its outputs appear gray, indicating they are not ready to run because the required tool parameters have not been populated and are not valid. As tools are chained together, downstream tools become dependent on the outputs of upstream tools.
When you set tool parameters and click Confirm in a tool dialog, the dialog closes and a blue icon indicates the tool is validating. Downstream tools will also validate, if applicable.
A tool element will be marked as ready to run (the color changes to yellow) if all three of the following requirements are met:
- All required parameters have been specified
- The data and values provided meet the requirements of each parameter
- There are no errors remaining in the tool
Output data variables
When the tool state is ready to run, the outputs of the tool that will be created based on the specified parameters also change to ready to run (color is green). The status of downstream tools may change if the status of their input data changes.
Note:
Optional outputs do not need to be in a ready-to-run state for a tool to run. For more details on the outputs of a specific tool, refer to the tool documentation.
Resize and move elements
To resize a model element, select the element and drag any of its handles.
To move a model element, select the element and drag it to the desired location in the model diagram. You can also rearrange a model by clicking Auto layout on the layout toolbar.
Rename elements
The default names of tool and data elements are automatically generated when the element is added. If the element name already exists in the model, it is appended with a unique number.
Changing the name of an element does not affect the value of the element. For example, renaming a data variable from Roads to Streets does not change the dataset, only the name in the model.
Complete the following steps to rename an element:
- Click an element to select it.
- On the element toolbar, click Rename .
- Type a new title and press Enter or click a blank area on the model diagram to apply the change.
The element name is updated.
Note:
The tool dialog will display the layer name instead of the data element label if you rename a data element referencing a map layer.
Remove elements
You can remove unnecessary elements from a model diagram. To remove an element, select one or more elements and click Delete on the element toolbar or press Delete on your keyboard.
The following methods can be used to select elements in a model:
- Click—Select an individual element.
- Draw a box or Shift+click—Select multiple elements.
- Ctrl+A—Select all elements.
Note:
Removing elements that are connected to other elements may break the model.
Save a model
To save the edits to a model diagram, click Save on the model toolbar.
Tip:
A blue dot on the Save button indicates there are unsaved changes in the model.
If you have unsaved changes when you disconnect from an analysis session or switch to a different active model, you will be prompted to save or discard your changes.
Resources
Use the following resources to learn more: