Sprinkler Pipe using IF and For loop in python

I am trying to size the sprinkler pipe bses on hazard classification. For light hazard Type==1 and ordinary Type==2

If type ==1
I want to size the pipes according to light hazard classification.
2 no of sprinkler pipe size is 25mm
Similarly… To others…

Please Help

Can you show what the error is that you are getting and a picture of the actual Dynamo graph? Just a picture of the python without seeing any inputs doesn’t let us help you.

Hi,
if there isen’t another elif loop for the “first” loop (if Type==1 and elif Type==2) you need to use if and else.
So write:
“else Type==2:”

and is can be a problem if you write your data list “Size” to your family parameter and your parameter is only for numbers, because you append “May No Surpassed” to it…and that is a string.

You dont use "IN[2] and IN[3] so you can delete it.

1 Like