My question is for C3D, but I think it’s really just a matter of me better understanding the way nodes are laid out in dynamo, regarding logic, specifically If statements. Essentially, I’ve been working on a graph that will import a series of stations and elevations from an xls file, create a corridor from it, using specified assemblies & alignment and finally create a surface from the corridor. I’ve got it all working but I want to make it so that if edits are made in the xls file, the graph could be rerun to update. Currently, upon re-running the graph, it fails because the surface already exists.
So, essentially what I need is, If surface X exists in file, regenerate it, and if it does not exist, create it from the corridor. I’ve been able to setup the if node to check for the surface and say true/false accordingly, but I can’t seem to figure out how to take things that last step.
Do I plug the series of commands themselves into the true/false inputs? That seems confusing. I also saw comments while looking for help that I need to keep the two branches separate for best results so I’m not sure how that will/might apply.
I’m also a little confused because the command nodes that I’m using to import and create the profiles seem to automatically associate themselves and overwrite but some of the other nodes like creating the surface from corridor do not work when the name is already used. So those behaviors, for lack of a better term, must be specific to each node?
Any guidance, tips, suggestions, references, etc. are appreciated. Thanks for reading!