Select to view content in your preferred language

ModelBuilder: "Merge Branch"

02-20-2013 05:52 AM
Regular Contributor
I've generated a model in ModelBuilder to automate the terrain preprocessing steps within ArcHydro. I've taken it a step further and generated a python condition script based on an argument supplied by the user to determine if Batch Watershed and Batch Subwatershed analysis is required. I then want to use "Merge Branch" to run the remaining processes as they are the same for Watersheds or Subwatershed. The problem that I have is either Batch Watershed or Batch Subwatershed will run due to the python condition statement and when I add both output to Merge Branch it won't run as its expecting both and not one or the other. I've attached my Python Script and as well as my ArcHydro Model.

Python Script:

# Import system modules
import arcpy

#Set the parameters
basinType = arcpy.GetParameterAsText(0)

    if basinType == "Subwatershed":

    elif basinType == "Watershed":

except Exception as e:
        AddPrintMessage (e[0],2)
0 Kudos
0 Replies