ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Merge Branch

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Environments
  • Licensing information

Summary

The Merge Branch tool merges two or more logical branches into a single output.

Branching in a model is accomplished by creating a script tool that implements the necessary if-then-else logic. It is often the case when branching that you need to merge two branches into a single process. What this means is that if you test an input against a condition (examples: whether the data exists on the disk, whether the cell size is greater than 30 meters, whether the field value is 1), it will create two outputs: True, if the condition is true, and False, if the condition is false. If the condition is True, you want to run some processes and if the condition is False, you want different processes to run, as illustrated below. At any point, only one of the branches will run depending on the condition and the input. The Merge Branch tool is used in such cases where it is not possible to say which branch will run and produce results. The output of both branches becomes the input for the Merge Branch tool. The tool looks at the inputs and passes the last output of a branch that has-been-run to the next tool. The Merge Branch tool allows any number of inputs and uses the multivalue parameter control.

Illustration

How Merge Branch tool works

Usage

  • This tool is intended for use in ModelBuilder and not in Python scripting.

  • The tool examines the list of input variables and returns the first variable that is in the has-been-run state.

  • Merge Branch accepts any data type in its list of values. The output data type is Any Value, which is a generic data type. This means you can connect the output of Merge Branch to any parameter of any tool. When the connected tool is run, it expects the contents of an Any Value variable to be of the correct data type; it is up to you to make sure that the contents are correct for the tool's parameter.

  • Note:

    All the tools in ArcGIS are empty (without color) when added in a model except Merge Branch and Collect Values. Unlike other system tools, Merge Branch is always a ready-to-run state (colored in). This is because the input to Merge Branch is a multiple value data type, and an empty multiple value is considered a valid input.

Syntax

MergeBranch_management ({in_values})
ParameterExplanationData Type
in_values
[in_value,...]
(Optional)

List of values from different branches. The first ready-to-run state value in the list will be the output of the tool.

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

Related topics

  • An overview of the General toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal