About comparison nodes

Hello everybody

I wanted to know if there is a node in the dynamo that “activates” other nodes according to a logical test.

For example, we have the “if” node, which compares values ​​according to a logical test, but it only compares.
Is there any node that, in addition to comparing, sends a trigger command to other nodes (depending on the result of the logical test)?

Perhaps this is what you are looking for, where your logical comparison happens in the Python Block show to run / freeze the subsequent designscript branches.

You could pass a function and then use Function.Apply as one way to accomplish this.

Scope.If is designed to only run one of two branches based on a true/false boolean :smiling_face: The other branch is npt ran through the VM at all, so its efficient!

1 Like

I’d recommend not using this method in actual development. It’s more of a thought exercise and proof of what’s possible than a legitimate way to write code as it can cause a lot of problems.

Defining your logic in a better way is the preferred solution. Python is the simplest way to do this, but other nodes and specific graph logic (like the ones mentioned above) also work.