How to ouput a value from Python script to Model Builder?

Discussion created by milans76 on Aug 23, 2012
Latest reply on Aug 23, 2012 by milans76
Hello all,

I am using Python script in my ModelBuilder. Script takes several values within the model and then after performing some calculations, script should output only one value which is further used in the model.

I am not sure how to write the piece of code in my script that will output the value (like integer type, etc...)? When using arcpy.AddMessage command just to check if Pyhton script works fine, I get results as expected. So the only problem is how to output the value so that the rest of my model could use it.

I tried arcpy.SetParameterAsText, however it does not work for if the output is a value.

Any help will be greatly appreciated.