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!


Can this answer from another post help you defining your statement?

Otherwise, add you graph as a .dyn file

Just a hint…Zoom in on a few nodes and then use the camera (upper right corner in Dynamo). Using this method will it be possible to read your graph.


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.


Do you have a dummy file as well? purge it, so it only contains the bare minimum.
You use many parameters I will have to redo, and that is a bit to much work just for helping you, so please provide all what is needed.


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

DesignScript is powerful… but I still prefer Python :slight_smile:
Simple statements however, is very easy to do in DesignScript :slight_smile: