Extensions - How to store custom parameters on ootb nodes?

Dear All,

Working on a graph-related extension I would like to store persistent custom information directly on existing ootb nodes - hence stored in the Dynamo file using the regular serialisation (as ootb nodes + 3rd party nodes should obviously not be changed by me).

This information should be optional and not require everyone to have this extension installed but other people working on this script should not “erase” the existing custom information either - it should remain as it is then (just serialised + deserialised).


A “property” dictionary that is part of every NodeModel and serialised automatically would be useful for this. Then everyone could just attach keys and values for his own workflow easily.

Since I don’t think this is possible currently - How would i do this in a proper / intended way @Michael_Kirschner2 @Racel?


In a first (stupid?) attempt I attached my property string to “Description” and thought it would be serialised / deserialised - but it seems that after reopening the script it gets overwritten with the node description and my custom value is lost again.

Is there a better way or better properties to store this in?

Thank you very much
Best regards, Eckart

There is no good way to do this currently, I would not advise you to try storing extension specific info on nodes - the graph should contain only information related to execution.

What we should do is give extension authors a way to serialize information into their own extensions object in the file. Unfortunately that does not exist today.

For now I would serialize this information in another file which users will need to keep around with their graph - I would think about this like any non code config file in a solution or project.

OK, i thought so.

Separate files can easily be lost, separated from the script or mixed up so it is not optimal. Extension specific structures in the Dynamo script file would be a possible solution, yes.

I still favor the idea of being able to to attach custom user data (could be just a dictionary of strings) to elements (e.g. nodes, groups, connectors, ports) - a bit like Revit Extensible storage or Rhino user data. With custom UI nodes this is already possible and pretty simple.

That would make extensions really powerful and enable developers to do many cool and unexpected things! @Michael_Kirschner2