Giving sequence to Dynamo script operation

Hi dear friends

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.

Thanks :slight_smile:

Hi there,

You could use this node:

imagen

Wair for finishing the first part of the script and then start the next part.

Cheers

Manel

3 Likes

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.

1 Like

Check out our discussion here:

1 Like

Thanks Manel for introducing this node to me.

I tried but it didn’t work. As shown in the below screenshot, It created the previous 3D views but didn’t create new 3D views.

Very simple but should look like this.

1 Like

Thanks. I tried again. But it doesn’t work.

Now my views (two 3D views), which were created from the last run, are deleted, but the new 3D views are not created after that. :frowning:

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.

3 Likes

If you upload your script, we could maybe help you.

Cheers

Manel

1 Like

Thanks Manel and @Nick_Boyts for your response.

I attached my script (including those two modules) here. Could you please look at it? Thanks

1.dyn (18.8 KB)

Hi Mojtaba.vlj

Could you try the modified script that I’ve uploaded in order to know if that is what you were looking for.

I can’t run it because I don’t have all the packages, but I guess it works.

1_Mod.dyn (18.3 KB)

Cheers

1 Like

Thank you so much @Manel_Fernandez
Finally it worked :slightly_smiling_face:

could you mark the post as solve?

Just in my latest post you can do that

Cheers

1 Like

Done

Thanx

1 Like