# Is there a way to run part of a graph by storing information in a node?

**URL:** <https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147>\
**Category:** Uncategorized\
**Created:** [May 31, 2017, 1:55am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147 "2017-05-31T01:55:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcusqwj](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@marcusqwj](https://forum.dynamobim.com/u/marcusqwj)\
**Post date:** [May 31, 2017, 1:55am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/1 "2017-05-31T01:55:50Z")

</div>

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/7/f726329b3853f5a5e454e95e41c462aa967b8fcd.png)

In my graph, I have a python node called ‘dictionary’ (where the cursor is at) which takes geometry and information from the orange groups, before passing it to the blue groups. I was wondering if there is a way to run twice - the first executing the orange groups and storing the data in ‘dictionary’; the second run is from ‘dictionary’ to the blue groups.

The reason I want to do this is that there too many processes which causes Revit to shut down when I run the entire graph. After the first run is done, I’d like to be able to run the second run as many times as I want to debug the blue groups. Any help is appreciated! 🙂

---

<div class="post-metadata">

**Author:** ![DeanB72](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@DeanB72](https://forum.dynamobim.com/u/DeanB72)\
**Post date:** [May 31, 2017, 6:02am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/3 "2017-05-31T06:02:03Z")

</div>

Hi… I’m an absolute novice when it comes to dynamo so apologies if I’m wrong but would the node freeze option be useful here? Select the node, right click and select freeze?

---

<div class="post-metadata">

**Author:** ![marcusqwj](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@marcusqwj](https://forum.dynamobim.com/u/marcusqwj)\
**Post date:** [May 31, 2017, 7:45am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/5 "2017-05-31T07:45:11Z")

</div>

Hi, thanks for your reply. However, I cannot freeze an upstream node to run downstream nodes, as everything downstream of a frozen node would be frozen as well.

---

<div class="post-metadata">

**Author:** ![marcusqwj](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@marcusqwj](https://forum.dynamobim.com/u/marcusqwj)\
**Post date:** [May 31, 2017, 8:11am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/6 "2017-05-31T08:11:39Z")

</div>

I apologise for not attaching my graph or showing the details earlier as this for a client, and I am unable to disclose it. Nevertheless, I have attached a simplified .dyn file featuring an upstream group, a ‘dictionary’ and a downstream group, for your testing. Thank you for your help.

[example.dyn](https://forum.dynamobim.com/uploads/short-url/cs43kp0MZdiDURN8YsSidZik9Md.dyn) (8.3 KB)

PS. My question is not specific to my .dyn file. I was wondering if there such a feature (or possible workarounds) that can run large graphs by parts to reduce the strain on RAM.

---

<div class="post-metadata">

**Author:** ![marcusqwj](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@marcusqwj](https://forum.dynamobim.com/u/marcusqwj)\
**Post date:** [May 31, 2017, 8:31am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/9 "2017-05-31T08:31:57Z")

</div>

Hi, the issue at hand is not about the use of Python scripts. I used them because I was handling large amount of data, and that was the best way to organise it, as seen by the complexity of the original post.

Just to make myself clear again, I want to know how, if its even possible, to run graph two times (the first parsing data from orange to ‘dictionary’ then second time from ‘dictionary’ to blue). So that I can work on the second half and rerun as much as I want without having going through the first half.

---

<div class="post-metadata">

**Author:** ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)\
**Post date:** [May 31, 2017, 8:42am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/11 "2017-05-31T08:42:44Z")

</div>

Just split the graph in two. write the results from part 1 to XLS or CSV and read that info into graph 2.

---

<div class="post-metadata">

**Author:** ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)\
**Post date:** [May 31, 2017, 8:45am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/12 "2017-05-31T08:45:30Z")

</div>

Hi @marcusqwj  
As you’ve observed you can put on hold the right part using the freeze option of the nodes.  
Then you don’t want to run the left part over and over again, when you test the right part, if I understand you correctly?  
For most cases actually once calculated, given no changes are made in those nodes, this is the default Dynamo behaviour. It only calculates if something changed.  
If it doesn’t work like that in your case for some reason you can try writing the data from your dictionary to an external file and then copy all the nodes on the right of the dictionary to a new definition and read the data from the external file.

---

<div class="post-metadata">

**Author:** ![alvpickmans](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alvpickmans/32/41236_2.png) [@alvpickmans](https://forum.dynamobim.com/u/alvpickmans)\
**Post date:** [May 31, 2017, 8:45am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/13 "2017-05-31T08:45:46Z")

</div>

Once a set of nodes have been computed, Dynamo doesn’t re-run them unless one suffers any change and then it will be re-run from that node upstream. So if your orange part doesn’t change in between runs, you should be able to freeze the blue side, run once, and then unfreeze the blue and run again.

You can always check the **Settings\>Show Run Preview** Option to visualize which parts of your graph will run.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/c/8c9e2d83b9d29d55ea71f31be50e5c530795823a.png) ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/d/8d78c6ec6bac300f83fb232b23993b9bee3fa3d9.PNG) ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/0/603168a6dc51898ecd5c0bce0c0c9ff8e55f971d.PNG)

---

<div class="post-metadata">

**Author:** ![marcusqwj](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@marcusqwj](https://forum.dynamobim.com/u/marcusqwj)\
**Post date:** [May 31, 2017, 8:57am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/14 "2017-05-31T08:57:02Z")

</div>

Thank you, this is definitely a possible workaround I haven’t thought of 🙂

---

<div class="post-metadata">

**Author:** ![marcusqwj](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@marcusqwj](https://forum.dynamobim.com/u/marcusqwj)\
**Post date:** [May 31, 2017, 8:58am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/15 "2017-05-31T08:58:47Z")

</div>

Yes, I was wondering if I could run the left and right halves independently. Thank you for the explanation. I believe the external file is viable alternative 🙂

---

<div class="post-metadata">

**Author:** ![marcusqwj](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@marcusqwj](https://forum.dynamobim.com/u/marcusqwj)\
**Post date:** [May 31, 2017, 9:00am UTC](https://forum.dynamobim.com/t/is-there-a-way-to-run-part-of-a-graph-by-storing-information-in-a-node/12147/16 "2017-05-31T09:00:59Z")

</div>

Thanks, ‘Show Run Preview’ and steps you have listed have been helpful 🙂
