Why isn't my script returning any values in Modelbuilder?

481
2
Jump to solution
04-21-2022 09:11 AM
LR2
by
New Contributor III

I want to output some variables for further use in ModelBuilder, however the parameters always end up empty. What's wrong?

LR2_0-1650557262159.png

LR2_1-1650557276964.png

LR2_2-1650557396118.png

 

0 Kudos
1 Solution

Accepted Solutions
LR2
by
New Contributor III

The message window from the modeler already shows everything at level 0. Returning values also doesn't work. However what does is 

    arcpy.SetParameter(2,PR_Out)
    arcpy.SetParameter(3,PID_Out)

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

nothing is returned by the function, you could build up a msg, then use it as a return object to print when it exits the function

Also

GetMessages—ArcGIS Pro | Documentation

doe that appear anywhere in your script?


... sort of retired...
0 Kudos
LR2
by
New Contributor III

The message window from the modeler already shows everything at level 0. Returning values also doesn't work. However what does is 

    arcpy.SetParameter(2,PR_Out)
    arcpy.SetParameter(3,PID_Out)
0 Kudos