Dynamo store bindings between sessions

Hi,

I’m experiencing a weird bug (?) with one of my .dyn-files, where element bindings appears to be stored between Dynamo sessions. That means that when I run the graph in a new session, Dynamo removes

As I understand it, element bindings should be cleared between sessions?
Is there anything typical maneuvers that could be causing Dynamo to remember bindings between sessions?

My graph is used to create new/update existing elements based on an excel sheet, and the only “stored” information in the file should be the File path node. At least to my knowledge.

Bindings are actually stored in the DYN if you save the file after running it, not just leveraged in a single session.

This forum post should get you squared away: Element Binding in Revit

This AU session should help you get a better understanding on the issues at play: https://www.autodesk.com/autodesk-university/class/Getting-Good-Stuff-Out-Pandoras-Box-Element-Binding-Dynamo-Revit-2019

Thank you for your reply.

What I expect my graph to do:
Let’s say I have two new elements in my Excel data.

  1. Run graph.
  2. Two new elements are created from Excel.
  3. Close Dynamo and Revit.
  4. Some time passes
  5. Excel data is updated. Three more elements have been added.
  6. Run graph again, in a new Revit/Dynamo session.
  7. Three new elements are created, for a total of five elements. The previous two should remain untouched.

Instead, what happens is that when I run the graph the second time, the two elements that were created in the first session are removed, and then recreated with the new three elements. This means that their position in the model are reset.

I have always thought that these bindings should be automatically reset between opening and closing the graph? But you are saying that the bindings will remain stored in the DYN-file if I save it after it has been run, as intended behavior?

I will have a look at your AU-class.

Yep. Open the DYN in text editor and you’ll see the bindings line will have some base 64 encoded data in it. Those are your bindings and what will need to be cleared.

The good news is that these shouldn’t remove any data when recreated - parameter values and updates should still be as associated before. As such if your excel file adds new lines and your graph creates all 5 items you should be good to go.