# Remove unused reference planes

**URL:** <https://forum.dynamobim.com/t/remove-unused-reference-planes/20989>\
**Category:** Revit\
**Created:** [April 12, 2018, 2:59pm UTC](https://forum.dynamobim.com/t/remove-unused-reference-planes/20989 "2018-04-12T14:59:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus\_Isacsson](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@Marcus\_Isacsson](https://forum.dynamobim.com/u/Marcus_Isacsson)\
**Post date:** [April 12, 2018, 2:59pm UTC](https://forum.dynamobim.com/t/remove-unused-reference-planes/20989/1 "2018-04-12T14:59:37Z")

</div>

Hi fellas!

I wonder if anyone have an idea about deleting unused reference planes, could that be possible using Dynamo? (reference planes that aren’t used as hosts for elements).

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [April 12, 2018, 4:54pm UTC](https://forum.dynamobim.com/t/remove-unused-reference-planes/20989/2 "2018-04-12T16:54:28Z")

</div>

@Konrad_K_Sobon did something similar for reference planes that were not named. I don’t believe I have seen anyone do what you are saying though. One problem I have seen with reference planes is, that a categorical collection will report reference planes of edited wall profiles. 🙄 That definitely makes this more difficult!

 ![20180412refPlanes](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/3291d0896be38a545993668b59b16d7b2c576fa6.gif)

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 13, 2018, 8:47pm UTC](https://forum.dynamobim.com/t/remove-unused-reference-planes/20989/3 "2018-04-13T20:47:21Z")

</div>

> [@john\_pierson](#):
>
> a categorical collection will report reference planes of edited wall profiles.

I noticed the reference planes generated by edited wall profiles return a Dimension element when using the method [GetDependentElements](http://www.revitapidocs.com/2018.1/56e875d3-014b-a996-69c3-e6ed9b885f5c.htm), so they can be filtered out by that – oddly that method returns nothing on the reference planes auto-generated by railings though (not sure what other elements generate them as well). But in either case Revit returns an error when trying to delete those kinds of reference planes so they can be skipped.

 ![delete%20unused%20ref%20planes](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/2/72c05b5582034168b2046ebe1fed31e13f5e722f.png)

Unfortunately that method doesn’t seem to return elements that are hosted on reference planes though (I was hopeful because it is a newer method), and those don’t cause an error when being deleted either. So I don’t really see a way to filter out reference planes that are hosting ☹

Deleting unnamed reference planes seems best practice to me - I usually name them if they’re going to host something anyway so they can be chosen from the Workplane list. The frozen node pictured from [Archi-lab](https://forum.dynamobim.com/t/revit-2022-dynamo-2-10-package-not-showing-up-and-icons-missing/62933/7?) does just that

---

<div class="post-metadata">

**Author:** ![Marcus\_Isacsson](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@Marcus\_Isacsson](https://forum.dynamobim.com/u/Marcus_Isacsson)\
**Post date:** [April 16, 2018, 8:58am UTC](https://forum.dynamobim.com/t/remove-unused-reference-planes/20989/4 "2018-04-16T08:58:26Z")

</div>

Thanks!  
Yes, naming sure is a good practice to use. Unfortunately this soup has been made by many chefs, and some of them didn’t bother to do this 🙂

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [April 16, 2018, 9:59am UTC](https://forum.dynamobim.com/t/remove-unused-reference-planes/20989/5 "2018-04-16T09:59:40Z")

</div>

Have a look at @oliver.green 's thread here - it may be of use!

> [@Pre-Delete Elements: Know What You're About to Delete](https://forum.dynamobim.com/t/pre-delete-elements-know-what-youre-about-to-delete/19976):
>
> Hi all, The question: how to know which elements would be deleted if I deleted a certain object in my model? For instance, if I deleted a wall, can I get a list of its hosted objects which would also get deleted? I’ve been looking for a Python version of this workflow for some time, so though I’d share. Credit to @Deyan_Nenov for his macro version (I’ve just more or less transcribed it to Python) and to @Thomas_Mahon for various tips. Original macro can be found here: [https://twitter.com/did…](https://twitter.com/didonenov/status/837293919159390208)
