Script reverses on me .... is that normal

I am trying to collect these windows with an instance width and height… and then duplicate a family that has width and height as a type and feed it the width and height parameter and doing so i get Type windows.

This works perfectly…but i also wanted to put in this yes/no parameter for if it is a door… And then duplicate a door family and replace the window for a door… Now this is tricky and i havn’t got that working yet.
It doesn’t want to swap the family because it is an other category.

So i thought let’s first read the parameters of the window it’s location and host and then delete it, and then place the door at the same location on the same host.

but some how… my script gets the results back to the beginning of the script…so the moment i delete the family the data isn’t there anymore…

below is the beginning of the script…picture one, just collecting the data… but when i connect to the rest of the script…it shows the results all the way to the beginning. This isn’t normal right?

i made the connection saved the file…closed the file and opened it…then run it…

Can you post a picture of the full script? Your description is a little bit confusing.

And are you set to running it as automatic or manual?

window_door.dyn (45.2 KB)


The all elements of category won’t refresh automatically. This is to keep your system from having to rework every bit of code every time you run the graph.

Try disconnecting the input, run the graph, and reconnect the input. There are also solutions via custom nodes (springs has a refresh all node), or running things via the Dynamo player.

Also, depending on how you have this set up, you may have some issues with element binding at the part where you make the new windows/doors. Element binding causes a change the input of nodes which create Revit elements will remove the previously created elements. This is usually good as it keeps you from making another set of elements at each update - you could flood your model with families as you built your graph. If this causes an issue for you, look into element binding in the forum and try to resolve the issue with the solutions found there. Should that not work start a new topic posting what you have tried.

Jacob i am not talking about a refresh…this happens when i start Dynamo completely fresh…
So i open dynamo…open the script…run the script and get that it tracks back all the way…so the window i want to change is already deleted and it doesn’t use it’s data…it tracks back…

Are you running it in automatic? Also can you share a rvt with the family types needed to run this?

dropbox link