Need help with "If" node


I created a graph to delete elements in a model. But I only want it to proceed if the model name ends with “detached”. If the name of the model does not end with “detached” I don’t want it to delete the elements I just want a user message box to appear. So far its doing both.

Can somebody please show me how to do it. Is there another node I can use?
Thanks in advance.

There might be a better way to do this but this is what I could think on top of my head at the moment.


Thank you. This is a big help.

1 Like

Amol’s solution is great because he’s using a node with a run check (confirm), but in general Dynamo can’t really “prevent” nodes from running under a certain condition. You essentially have to let the node run and fail. This is usually done by passing either a qualified object or a null value depending on the result needed.

1 Like