I am very beginner in use of Dynamo and Python. Would you please help me to build a script, which is going to read 6 variables from previous Nodes. If test RH>MaxRH is true, then a recalculation of RH is required. Please see the image, I would really appreciate any help. Thank you.
I would highlight that what you are doing is design script and not python. If you was after python you need to look for a node called “Python Script” or similar.
As you see, in your design script code block you are missing return = [imperative] also you are missing your loop (while/for) etc. my post was just an example of design script sintax for codeblock loop.
Hi @ml31, I think what Jan and Brendan point out is that your node fails because the syntaxe is a mix between Designscript (working for code blocks) and Python (working in Python node).
For exemple your first IF statement is written without parenthesis as in Python, the second IF has parenthesis like in Designscript.
Find out on the net the correct DS syntaxe, correct it and you will make it work in the code block.
Also, I am no expert as I am learning it, but python is more efficient for this if you want to use a Python node (because DS uses a lot of parenthesis, semicolons, brackets as you can see in Jan’s Pic.