Input node that allows user in dynamo player to decide whether to run another node or not

So, I have this dynamo script that works well to create levels and floor plans from an Excel file. What I want to accomplish however, is to give the option for the user in the dynamo player to decide whether or not they want to make make the floor plans? Is there an input node that could be inserted right after the Level.ByElevationAndName node?

The flow is attached, any help would be awesome. Or if you could direct me to a forum where this has already been answered please let me know. Have yet to find anything.

Thanks

The only way to actually 100% stop execution of some code in Dynamo is to use a scope IF node or to use imperative code.

The normal if node will still execute both branches even if the input test is false.

passing nulls around might also work, but thats not exactly the same thing.

4 Likes

Python is an easy way to add a true “switch” however a lot of people still use the null method that @Michael_Kirschner2 mentioned. Instead of not running a certain branch of a graph it just gets run with null values.

2 Likes

I’m in camp ‘pass null values’ - if you manage this well it takes pretty much 0 time to execute and saves you so many headaches with mismatched lists.

1 Like

Thank you all for the help! This was the solution I got that works. Just checked the boolean as Is Input and allows the user in dynamo player to decide what views they want to make.

1 Like

The Tool.RunMe is a steam node

1 Like