Copy elements from link


Hi all,
Very quick question about scripting:
In the workflow above everything is great, I can create the same elements of the link in my host file.
But if I move from one category to another to copy, for example floors and then walls, the previous one (floors) gets deleted. I can come around this problem by closing dynamo and restarting it.

Did anyone had a similar issue and had found a solution?

Thanks in advance all. Have a nice weekend.

It’s always best to search the forum for similar topics before posting, as you will likely find some additional information or even an answer to your question.

What you’re referring to is known as ‘element binding’ and is expected behavior. As you’re creating your graph and testing your logic, you don’t necessarily want everything you do to be set once and then unchanged. Think of a singular session of a specific Dynamo graph as one “command”. You’re rerunning the command as you make changes in the graph workspace.

The intended workflow once you have a working graph is to use something like Dynamo Player or, at the very least, run once then close.

Yep, that is a known issue. It is caused by element bindings. You can read several cases on forum.

You can use Dynamo player as an option. It doesn’t have these bindings, and you can run it multiple times without created/copied elements disappearing.

Hi you have have an issue with your link node…try ootb element type - all element of type -revit link instance

Just to be clear, unless a restart of the application is necessary, this is not a bug. It’s the correct and intended functionality when authoring graphs. There are known issues around element binding, but this is not one.

1 Like

The application restart is necessary, without it does not function the way I want it to. But thanks a lot for explaining the concept of ‘element binding’.

The steps to clear this out are well documented in the Element Binding post I made a few years back. But to summarize, to suppress binding:

  1. Open the .dyn file in a text editor and remove the content in the bindings key, or otherwise claer the bindings (replace nodes and don’t execute).
  2. Open the graph and execute it in Dynamo player; each run will make new instances. Alternatively you can open it and run it in Dynamo, then close without saving and reopen it and run again - if at any point you save the bindings will be left in the file.

As an alternative you can leverage function passing to suppress all bindings from ‘creation’ nodes by way of the Function Apply node. This requires a good understanding of Dynamo and keeping a node in a function state, and makes lacing/list levels more difficult.

1 Like