Replace Family Script: Error - Just Works once

Hey all!

Here we have a workflow that works, but just once. Someone who can help us??

We are trying to replace families face based with others non hosted (placed by level). Previously we have to select the elements we need to replace with Collector.CurrentSelection and takes the coordinates from the original elements. Then specify the desired family and the level we need to place it.

It works when we run the script the first time, but not the times after. We tried to reopen the dynamo file to the second try, and it also works, but then the elements placed on the first run disappear.

And, in case we need it, could be possible to flip the element already placed? We were looking for weeks how to flip an element by dynamo and we don’t find anything.

Thanks in advance!!

Hi,

OOTB nodes have Element binding.
You can use workaround to avoid the binding.

Use Dynamo Player or group the newly created elements in Revit before re-running the graph.

1 Like

It could be because you’re not refreshing your CurrentSelection. Use a boolean node to update your selection between runs. It’s likely that you will still replace the original families because of what @Alban_de_Chasteigner mentioned. Using Python to place your new families would be a viable solution.

2 Likes