I worked on a script to create new 3D views based on each clash found in Revit model. I want to extend my script to automatically delete these new 3D views, which were created in the last run, before creating new 3D views based on new clashes. In fact, in my script, I have several modules. One of them is to delete my previous views created and saved in my models, and another one is to create new 3D views in my model based on the most updated clashes. Is there a way to give a sequence to the script operation? For example, first delete the previous views and then create new views. If both modules in my script work simultaneously, no new 3D views will be created.
please note that when using Passthrough I have found it best to close and reopen the script if you want need to run the script again. The way Dynamo passes information may prevent the Passthrough node from working properly if ran multiple times.
A Passthrough or Wait node simply says “don’t do anything that comes after this node until these two variables have values” - the two variables being passThrough and waitFor. So you could delete the current views and get the view names of the new views you’re going to create, but since you don’t want to create the new views until after the previous views are deleted you would want the new view creation to come after Passthrough.
Your waitFor input would likely be the new view names to be created. Those values wouldn’t get “passed through” the node until after the previous views have been deleted. Then you could continue to create new views with the new names.