# Version control of a graph

**URL:** <https://forum.dynamobim.com/t/version-control-of-a-graph/102178>\
**Category:** Uncategorized\
**Created:** [June 25, 2024, 12:14pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178 "2024-06-25T12:14:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [June 25, 2024, 12:14pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178/1 "2024-06-25T12:14:30Z")

</div>

Is there a property in the graph where the developer can add or search for some kind of version of the script such as 1.1 or 2.1. I also want to reach it using Python or C# if possible

Civil 3D and Revit 2023 - 2025

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 25, 2024, 4:07pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178/2 "2024-06-25T16:07:45Z")

</div>

You can set a custom property to store this info. This can be read directly from any language that can read text l, doubly easy if you have Python added to it.

The property can be set in bulk when publishing a set of graphs, or you can add one manually.

For versioning as in ‘last time someone saved this file’ you’d have to eat ch the metadata added by windows. You can use that in conjunction with the graph’s Uuid (property in the file) to track ‘if things are current’.

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [June 25, 2024, 7:55pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178/3 "2024-06-25T19:55:16Z")

</div>

Thanks @jacob.small  
Yepp, the custom properties came up in my mind and it seems to be able to search for.

What I’m looking for is to use my python node that collect “Name of workspace”, “time”, “date” and “username” and now I want to add the information in the custom properties.  
Still need to figure out if I can reach that info from the .dyn file even if I run have the graph open.

> [@jacob.small](#):
>
> For versioning as in ‘last time someone saved this file’ you’d have to eat ch the metadata added by windows. You can use that in conjunction with the graph’s Uuid (property in the file) to track ‘if things are current’.

This might need a little bit more investigation. Thanks.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 25, 2024, 8:24pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178/4 "2024-06-25T20:24:35Z")

</div>

> [@patrick.ericson](#):
>
> What I’m looking for is to use my python node that collect “Name of workspace”, “time”, “date” and “username” and now I want to add the information in the custom properties.

Not sure if you have seen it, but this might help (once you figure out how to surface the windows metadata): [Updating python node in multiple scripts - #15 by jacob.small](https://forum.dynamobim.com/t/updating-python-node-in-multiple-scripts/82637/15)

Execute this from outside the active dyn file (for the active file you’d want a view extension, which might be good for a new packages offering), as any open dyn will overwrite the parameter values if you save in the session.

Been awhile (Dynamo 2.8?), but it should still work baring a CPython update or two (8?).

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [June 26, 2024, 4:29pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178/5 "2024-06-26T16:29:37Z")

</div>

I went in to read in my old book about Python and the solution became in to read the graph as a json file.  
After some testing and forget to rename some variables between my small script and big script it’s up and running. Time for deploy and hopefully some data of used graph. 🙂

---

<div class="post-metadata">

**Author:** ![Brendan\_Cassidy](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/brendan_cassidy/32/7685_2.png) [@Brendan\_Cassidy](https://forum.dynamobim.com/u/Brendan_Cassidy)\
**Post date:** [June 26, 2024, 4:46pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178/6 "2024-06-26T16:46:40Z")

</div>

I would say use the custom property as already discussed, but for a further solution to cover earlier versions of dynamo that do not contain this custom property is that you can read the notes block with the same reading of json.

Just got to make sure you add a bit of info at the beginning of them as standard.

Example of the notes:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/b/eb227714c2d64007b7600711156aa6b3f53a6f0e.jpeg)

---

<div class="post-metadata">

**Author:** ![patrick.ericson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/patrick.ericson/32/121411_2.png) [@patrick.ericson](https://forum.dynamobim.com/u/patrick.ericson)\
**Post date:** [June 26, 2024, 7:31pm UTC](https://forum.dynamobim.com/t/version-control-of-a-graph/102178/7 "2024-06-26T19:31:05Z")

</div>

Good point, I have had that info in my template for Dynamo but never thought about that possibility as well. Good to know that we can read info from notes as well.
