# Prevent re-running in dynamo

**URL:** <https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230>\
**Category:** Uncategorized\
**Created:** [May 29, 2016, 12:54am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230 "2016-05-29T00:54:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 29, 2016, 12:54am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/1 "2016-05-29T00:54:48Z")

</div>

Dear Everyone,  
Is it possible to prevent dynamo from starting over?  
For example: if I use node “FamilyInstance.ByPoint” to firstly place an element at location A, then I additionally place an element at location B in the second run. The model now should have 2 elements at location A and B. But the final result shows that only location B-element exists and location A-element is removed.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/d/d4ed2cbd3236ed02b545c568d855bdf56459e694.JPG)  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/4/4e074db2acd27827d9306a38cb9b1ae0546df6af.JPG)  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/8/89369cea39bde25139003981bb23796e2fab4a87.JPG)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [May 29, 2016, 4:42am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/2 "2016-05-29T04:42:55Z")

</div>

Not sure of the relevance of the second run, but you could feed in multiple points…

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/2/2985b8c3da2c1312baf36c231d1c3e358d8607d1.png)

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 29, 2016, 6:04am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/3 "2016-05-29T06:04:06Z")

</div>

Vikram\_Subbaiah, Thank you very much for the quick response.  
I soon know the solution of feeding in multiple points. However, in case the previous point is not known and I like to proceed to place new instances (M\_Desk:2000x1000 rather than M\_Desk:1525x762) in new positions, the program will start over and remove all previously-placed stances (M\_Desk:1525x762 will be removed).

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [May 29, 2016, 6:31am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/4 "2016-05-29T06:31:47Z")

</div>

It’s currently not possible. You’ll have to close and reopen Dynamo to make the changes permanent.

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 29, 2016, 8:01am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/5 "2016-05-29T08:01:25Z")

</div>

Dear Einar\_Raknes  
I do as your recommendation but the previously-placed items are still removed.  
Do you have other solutions?  
Thank you very much

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [May 29, 2016, 12:23pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/6 "2016-05-29T12:23:42Z")

</div>

Not sure as to what exactly you’re trying to do.  
But assuming you want to create a second element whose location is determined relative to the location of the first element, you could try something like this …

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/4/4655ce1b1cee6145a8b38f6f73516824cf4187e2.png)

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 29, 2016, 1:04pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/7 "2016-05-29T13:04:34Z")

</div>

Dear Vikram\_Subbaiah  
Maybe you misunderstand what I mean. You can be back to my question at very beginning. Firstly, I place an instance (called: instance 1) at location A (first run of Dynamo). Then, at the second run, I like to place another instance (called: instance 2) at position B with assumption of not knowing the instance 1 at location A. after the second run, the instance 1 is removed and remains the instance 2. My question: are there any way to remain the instance 1 after the second run of dynamo?

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [May 30, 2016, 6:08am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/8 "2016-05-30T06:08:20Z")

</div>

Hi Hoc,

Are you looking for something like this:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/2/2ccf08ec8b196f77ea0262feecc321884a189e1a.gif)

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 30, 2016, 9:51am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/9 "2016-05-30T09:51:35Z")

</div>

Hi Kulkul,  
I misunderstand what I mean. could you please give me your email, so that I can send you document to better express what I want to do. Thank you very much

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [May 30, 2016, 10:17am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/10 "2016-05-30T10:17:11Z")

</div>

[kulkul7536@gmail.com](mailto:kulkul7536@gmail.com)

---

<div class="post-metadata">

**Author:** ![Alisder\_Brown](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alisder_brown/32/14995_2.png) [@Alisder\_Brown](https://forum.dynamobim.com/u/Alisder_Brown)\
**Post date:** [May 30, 2016, 1:32pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/11 "2016-05-30T13:32:46Z")

</div>

Hoc

As @Einar_Raknes mentioned. Running the definition once to place the object at Location A, closing Dynamo and re opening it and then running the definition again should place the second object without removing the first. I have a few definitions that i use to place objects and this is what i do when i want to add more objects without deleting the originals.  
Im sure i saw @Zach_Kron post something about this a while ago, think it is an intentional feature. Not sure of another way to get around it.

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 30, 2016, 1:46pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/12 "2016-05-30T13:46:00Z")

</div>

Dear Alisder\_Brown,  
I did as @Einar_Raknes 's suggestion. But the first object was still removed. I am using Revit 2015 and Dynamo 1.0.0. I will be grateful if you can me some videos to show how it works.  
Thank you very much for your help.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [May 30, 2016, 1:52pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/13 "2016-05-30T13:52:00Z")

</div>

This may be related to a problem I’ve discovered with Adaptive Components output by Custom Nodes (or any Family instance for that matter) - if you place multiple instances of the CN on the graph, only 1 object ID for the Adaptive Components is ever generated, resulting in a ‘last node wins’ scenario as Revit removes the previous output ACs from the first node and replaces them with the new! The behaviour described above seems to display this problem.

EDIT: Not sure if this is useful/relevant, but click [here](https://github.com/DynamoDS/DynamoRevit/issues/1014) for a link to the aforementioned problem on the Dynamo github

---

<div class="post-metadata">

**Author:** ![Alisder\_Brown](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alisder_brown/32/14995_2.png) [@Alisder\_Brown](https://forum.dynamobim.com/u/Alisder_Brown)\
**Post date:** [May 30, 2016, 1:57pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/14 "2016-05-30T13:57:12Z")

</div>

Hoc

That is strange. I just tested it again and it is working as i explained.  
Could you post your Dynamo file you are using to test it out please? Just need the Dynamo file, not the Revit file.  
Just to clarify, this is exactly what i am doing:

1. Set the points in Dynamo and Run the definition
2. Close the Dynamo definition (so it takes you back to the home screen) Or close down Dynamo completely)
3. Re open the definition, set the new points and hit run

When i do the above, the original object is not affected as it is not part of the new definition. Unless you have something in your definition that deletes family’s?

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 30, 2016, 1:59pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/15 "2016-05-30T13:59:20Z")

</div>

[place instance.dyn](https://forum.dynamobim.com/uploads/short-url/n7EvYXPtaB9cPAiX7y1X3Vlo9vA.dyn) (6.9 KB)  
Here you are.  
Please let me know if how it works. Many thanks to you

---

<div class="post-metadata">

**Author:** ![Alisder\_Brown](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alisder_brown/32/14995_2.png) [@Alisder\_Brown](https://forum.dynamobim.com/u/Alisder_Brown)\
**Post date:** [May 30, 2016, 2:04pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/16 "2016-05-30T14:04:06Z")

</div>

Hoc

Your file works fine. Im unsure why you are having problems when closing & reopening the file between runs.  
Maybe explain the exact process you are using or post a screen recording showing what you are doing?

You could try running the definition on a fresh Revit file and see if you get the same results.

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 30, 2016, 2:15pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/17 "2016-05-30T14:15:15Z")

</div>

@Alisder_Brown  
Could you give me your email? I will send you a short video that show how I do. The dynamo forum do not allow to upload video file here.  
Thank you

---

<div class="post-metadata">

**Author:** ![Alisder\_Brown](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alisder_brown/32/14995_2.png) [@Alisder\_Brown](https://forum.dynamobim.com/u/Alisder_Brown)\
**Post date:** [May 30, 2016, 3:51pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/18 "2016-05-30T15:51:09Z")

</div>

Thats strange  
I dont know why it is doing that on your machine. I do exactly as you are doing and it just places a new tree each time i close and reopen Dynamo. Works fine for me :s  
Unless its an error with your install of Dynamo? Maybe try uninstalling and reinstalling Dynamo (most stable version) and see if that fixes it.  
Not really sure what else there would be to check

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [May 30, 2016, 4:22pm UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/19 "2016-05-30T16:22:04Z")

</div>

It’s a popular request to have a ‘bake’ button or node in Dynamo. One current workaround besides reopening your DYN is to use it via Dyno (which seems to re-initiate Dynamo every time your DYN is invoked).

---

<div class="post-metadata">

**Author:** ![Hoc\_Em](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@Hoc\_Em](https://forum.dynamobim.com/u/Hoc_Em)\
**Post date:** [May 31, 2016, 12:52am UTC](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230/20 "2016-05-31T00:52:17Z")

</div>

@Alisder_Brown  
yes, it is so strange. I should reinstall Dynamo and see how it works again.  
I think Dynamo should have an additional function that allows users to select start-over or to continue program.

[Next page](https://forum.dynamobim.com/t/prevent-re-running-in-dynamo/4230.md?page=2)
