# Model Cleanup - Deleting views

**URL:** <https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432>\
**Category:** Revit\
**Created:** [August 30, 2017, 4:23pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432 "2017-08-30T16:23:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 4:23pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/1 "2017-08-30T16:23:39Z")

</div>

Hey all,

I created a “delete all unused views” tool a while back and it works great. I would like to take it a step further and delete any views that don’t have a reference symbol or plane. I ultimately want to delete everything I can without losing anything that was modeled. I could really use some direction from the Dynamo community.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [August 30, 2017, 4:44pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/2 "2017-08-30T16:44:28Z")

</div>

> [@wwdreamb](#):
>
> I ultimately want to delete everything I can without losing anything that was modeled.

That would mean deleting all views (except one.) But you’re saying you want to keep certain views?

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 6:52pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/3 "2017-08-30T18:52:10Z")

</div>

Yeah I just want to keep views that have a reference symbol or plane

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [August 30, 2017, 6:54pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/4 "2017-08-30T18:54:27Z")

</div>

I mean you could technically search all views for those element types but that’s going to be clunky and really slow.

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 6:57pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/5 "2017-08-30T18:57:41Z")

</div>

Yeah, we a looking at options for our firm. I have made a “delete all sheets” and “delete unused views”. In Dynamo, is it possible to combine these two tools to perform the tasks I want?

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [August 30, 2017, 6:58pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/6 "2017-08-30T18:58:31Z")

</div>

Could you post of screenshot of your graph?

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 6:59pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/7 "2017-08-30T18:59:13Z")

</div>

Which one?

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 7:00pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/8 "2017-08-30T19:00:18Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/e/3ee94e1d8529f2e2bb1b81bfa55a7048741faf01.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/2/c25faa024460c9b4734573f16428fdaf88891de9.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [August 30, 2017, 7:01pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/9 "2017-08-30T19:01:58Z")

</div>

Possibly. You can definitely combine them into one graph by just pasting the do parts together.

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 7:03pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/10 "2017-08-30T19:03:56Z")

</div>

Do they have to link together?

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [August 30, 2017, 7:03pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/11 "2017-08-30T19:03:59Z")

</div>

Can you also list your reference planes or symbols in Dynamo?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [August 30, 2017, 7:08pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/12 "2017-08-30T19:08:06Z")

</div>

Nope! You can have multiple scripts running alongside each other in the same graph.

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 7:08pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/13 "2017-08-30T19:08:37Z")

</div>

Oh sweet! great to know!

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 7:22pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/14 "2017-08-30T19:22:01Z")

</div>

Is there a way to specify “do this first, then do this”?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [August 30, 2017, 7:24pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/15 "2017-08-30T19:24:29Z")

</div>

You can use the transaction nodes or a wait node (Springs, BattleBIM, and other packages have these). Transaction nodes are out of the box but split your graph into two functions. I prefer wait nodes.

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 7:25pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/16 "2017-08-30T19:25:59Z")

</div>

Awesome! Much Mahalo!

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 7:58pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/17 "2017-08-30T19:58:25Z")

</div>

So the BattleBIM package “Wait” node - Would I set it up like this? (See Image)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/4/64363a0e1eeb4ca95c254ce8d1f2e27030b81411.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [August 30, 2017, 8:13pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/18 "2017-08-30T20:13:28Z")

</div>

Sorry, I guess that one doesn’t do what I thought it did. It actually waits for n seconds.

This is how the Springs node works.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/4/845dccfbec1c30d70857786ac1c8d4fffb70583b.png)  
You can even create your own wait node.  
Dynamo nodes are executed in their connected order (eg. a node will not run until all its inputs have been run.) So the way to force one node (or group of nodes) to run after another is to make the second node depend on an input from the first node.

Even something as simple as combining the first output with the second input will make sure that your second set of nodes runs after the first set is complete.

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

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 8:53pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/19 "2017-08-30T20:53:17Z")

</div>

Sweet! I think I got it to work. So I installed the Springs package and it didn’t appear to have the wait node. I did find “Passthrough” in the Clockwork package and that seemed to work BUT I got warnings when I ran the tool.

---

<div class="post-metadata">

**Author:** ![wwdreamb](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wwdreamb](https://forum.dynamobim.com/u/wwdreamb)\
**Post date:** [August 30, 2017, 8:57pm UTC](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432/20 "2017-08-30T20:57:38Z")

</div>

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

[Next page](https://forum.dynamobim.com/t/model-cleanup-deleting-views/14432.md?page=2)
