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?
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.
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.
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:
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).
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.