"Successfully" run model doesn't produce output

03-17-2014 07:24 PM
New Contributor
Hello All,
Using 10.2.1:

I am having issues with the last section of my model. I've clipped out the subsection of my model that is giving me problems and it is attached here. I added the below custom script to create an if-then-else logical branching. The tool runs and gives a "Succeeded at ..." for the model, but after it is done running the output from the model doesn't actually exists anywhere despite no errors given.

You can use any two shapefiles as the inputs to the model for testing purposes.

#import modules
import arcpy

#set parameter
PrevMat = arcpy.GetParameterAsText(0)
PrevMatYes = arcpy.GetParameterAsText(1)
PrevMatNo = arcpy.GetParameterAsText(2)

if arcpy.GetParameterAsText(0) == "Yes":
   arcpy.SetParameterAsText(1, "True")
   arcpy.SetParameterAsText(2, "False")
   arcpy.AddWarning("Ah-Ha...so we are considering previously delivered material this quarter \n")
   arcpy.SetParameterAsText(1, "False")
   arcpy.SetParameterAsText(2, "True")
   arcpy.AddWarning("Phew...we are not considering previously delivered material this quarter \n")
0 Kudos
0 Replies