Bug with If in dynamo



Hello !

An image is better than a long text :

My test is false, but the result of the if is the true one…

What’s wrong ?

Thanks !


I think the issue here is that you’re trying to send through lists with different lengths, maybe try flatten the both of them, or if that isn’t an option maybe replace the If node with a ScopeIf node.


With a scopeIf, my dynamo crash…

Flattening everything doesn’t changed anything…


I suggest trying to run it again.
A crash doesn’t simply occur due to a “wrong” node.


Well, I alsorestarted dynamo it crashed again.


If you just retry it with the If node, could you place a Watch node after the If node and show both results?


Here it is :

I found the solution by creating a python script but i still don’t understand this bug…


Then I’d say share it and mark that as a solution, I was actually looking for whether the coordinates are actually different and not just shortening the list to the shortest list.


Here it is :

Thanks btw Paul,


You’re welcome, even though I didn’t solve it for you ;).


The If node expects lists of equal length. If the lists are not equal the node returns the number of values within the shortest list (kind of like shortest lacing.) Clockwork has a node to handle this, which uses logic similar to the codeblock I’ve shown here.


What’s the advantage of ScopeIf+ over ScopeIf?


ScopeIf does a few background things differently than a regular If node. The list length is the only obvious difference, but sometimes ScopeIf can crash when not used properly. ScopeIf+ is just a simple conditional statement that does exactly what you would expect it to do, nothing fancy, but won’t crash on you if used improperly (if that’s even possible.)