If null exit else continue


I have made a “switch” to set the choice by the user which “path” dynamo must follow.
It works fine but i get always the messages that dynamo has run with errors.

How can i build some kind of “If value is Null Exit else CONTINUE” to get rid of the error.

the button is set to false so only Point.Y has values Point.X = Null.


try in codeblock type …


replace “NoVal” with any value you want , in case of null

Edit: nevermind I had it backwards.

Use the Toggle node in the Rhythm package. It will take a boolean and a node and cleanly (no errors) either run the node or ignore it.

1 Like

Technically this doesn’t ‘ignore’ it, but passes a null value, which returns null for any node except the isNull node, reducing computation time to effectively 0.

sorry for my english.
That’s how you get rid of the error message

thank you all but it is not my solution, i really want to quit after Point.X (in this example) because it is Null, and go on with Point.Y to finish my graph.

I know there is a node Thread.Pause i am looking for something like Thread.Exit if is true to a condition, else continue.

It’s currently not possible to interrupt the execution of a graph without throwing an error.

1 Like


I was afraid that this is not yet possible.

Often times errors which show in he console can be avoided by wrapping functions in another function using Design Script.

This graph avoids the error in the lower string of nodes by creating a list (placing the function inside the square brackets) and then getting the item at the first index of the list (the square brackets with a 0 in it).

This quickly performs two functions which have nearly no-impact on run time, and returns the intended data set. This does often throw the error on sequential runs though, but it should suffice for stuff like Refinery and Dynamo player usage.

I may have had a few conversations with members of the development team where we disagreed as to how this should be classified - they say bug, I say feature. If anyone does go this route know that it could come back to haunt you in a future release where a ‘feature’ gets fixed.