Trouble making IF statement process Conditionals

Hello, I am trying to make a script that sets the values of multiple pipe expansion loops based on the size of the previous one (think Russian dolls). The expansion loops are revit families that size themselves properly based on the proper formulas. However to nest them I need to override those sizings. The math all makes sense to me and should be right, but I know I am messing up on how I am feeding the conditionals into the IF statement. It seems like the script is pedering out before it gets to this formula. I am testing it to just run Loop 1 and Loop 2 right now, thats why is everything else is frozen. Please advise. thanks!

Resize_Create Nested Loop2.0.dyn (24.9 KB)
Hello erfajo,
Yes i was curious about how to do the entire if statement in a code block so that does help, however it is merely tangential to my problem. This is because I already have a if statement that should be sufficient, however it is not processing the information I am feeding it. Please advise. See attached file. Thanks!

Does dynamo try to solve all the equations simultaniously? or can you make it solve equations in a certain order? because i think that may be part of my problem. My equation is supposed to say resize this loop based on X criteria. Then, look at that answer, and compare it to this other criteria Y. If X is greater than Y then, your good, if not, add Z to X.


I was able to figure it out using your if statement inside a code block. It made everything more simple for me. THANK YOU!

1 Like