# Delete unused materials

**URL:** <https://forum.dynamobim.com/t/delete-unused-materials/9936>\
**Category:** Revit\
**Created:** [February 27, 2017, 7:12pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936 "2017-02-27T19:12:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [February 27, 2017, 7:12pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/1 "2017-02-27T19:12:45Z")

</div>

Hey community!  
This is my first post - and i have done actually no dynamo programming,  
but i am looking for some way to **get rid off my unused materials!**

Does anybody have a clue?

Thnx!

---

<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:** [February 27, 2017, 10:05pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/2 "2017-02-27T22:05:07Z")

</div>

Hello and welcome! It is recommended to explore the forum a little bit before posting. You can type your keywords in the search field and find some clues to get started. If needed, there are at least two sites that could help you to find some basic answers along your way:  
[http://dynamoprimer.com/en/01\_Introduction/1\_introduction.html](http://dynamoprimer.com/en/01_Introduction/1_introduction.html)  
[http://dictionary.dynamobim.com/#/](http://dictionary.dynamobim.com/#/)  
You also need to be aware that it’s necessary to show what you’ve done or what you found so far on the topic in order to get some help. The rest of the advice can be found in this thread:

> [@How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677):
>
> One of the main goals of the Dynamo community is to help others. One way to do that is by answering your questions. But to get the right answer, you’ll first have to ask your question in the right way. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions on how to achieve that. Do not think of these suggestions as rules and especially do not take them as a guarantee of getting an an…

---

<div class="post-metadata">

**Author:** ![Yien](https://avatars.discourse-cdn.com/v4/letter/y/ecd19e/32.png) [@Yien](https://forum.dynamobim.com/u/Yien)\
**Post date:** [February 27, 2017, 10:59pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/3 "2017-02-27T22:59:51Z")

</div>

Well you could start by a comparison between a Revit material schedule and all the materials extract with Dynamo.  
Then just delete the difference.

Y

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [February 28, 2017, 3:14pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/4 "2017-02-28T15:14:24Z")

</div>

@Yna_Db Thanx for that! i did a search already…  
i did not find any solutions discussions for deleting unused materials…  
so i thought i start one…

@Yien Thx for your reply!  
as i mentioned i am a absolute beginner!  
we just start to get into dynamo  
i tried to use a already made dynamo for deleting unused LINE-TYPES…  
but the [arch-lab.net](http://arch-lab.net) package seems to be outdated (?) - because the needed part “Delete Elements” i cannot find…

we actually work hard on projects… so there is little less time for "learning"  
but i want to get into it…

our problem is, that using revit, after a while there thousands of unused materials called “Standard” and we didn’t found the origin where there came from… so rigth no we just try to find a way (outside the revit function to purge)  
to delete in selective way…

the overall aim is to get a dynamo to choose what to delete, and the delete chosen elements…

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [February 28, 2017, 3:15pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/5 "2017-02-28T15:15:55Z")

</div>

sorry for my question, but how would you start?

---

<div class="post-metadata">

**Author:** ![Yien](https://avatars.discourse-cdn.com/v4/letter/y/ecd19e/32.png) [@Yien](https://forum.dynamobim.com/u/Yien)\
**Post date:** [February 28, 2017, 3:45pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/6 "2017-02-28T15:45:04Z")

</div>

here the node i just made.

the top is to select ALL material in project.  
the bottom, is to select material that is use in the project : you must create a material schedule within Revit, because the node extract the data from the view schedule.

you will need those packages with Dynamo 1.2 :

-Bimorph  
-Bakery

so the compare node just made a difference a give Material NOT in use.  
the last step is deleting material by id.

hope it help

[mat not in project.dyn](https://forum.dynamobim.com/uploads/short-url/bKphXroffL4sLhbhrNQ3rYFQNKp.dyn) (10.1 KB)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/9/897462d75a383e3605a3818ad08b21c98d45b483.png)

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [March 1, 2017, 9:28am UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/7 "2017-03-01T09:28:16Z")

</div>

Hey Yien

thanx for your effort.  
i didn’t found time to test your node, but i will…

meanwhile i found another way to delete Materials with a string input,  
so i find those “nasty” materials called **“Standard”** (i don’t know where there are coming from…)

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/8/e873954b53de98d32e06d8b26576ae3c858915c4.png)

But, unfortunately there are some “more” unused Materails - named **“Standard”** , which are called - in german **Materialobjekt \> Darstellung**  
see here  
(in my next post - i can only post one pic - not file!)  
there are some thousands more “Standard” - i think they are called Assets???

I did not find a way to “pick” those as well…  
:-/

Maybe you know how to pick/name&grab them?

in one project we had aprox. 189.000! to purge, which took around 20 min. and gave back aprox. 20-30MB file size…!

thanx

L

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [March 1, 2017, 9:29am UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/8 "2017-03-01T09:29:13Z")

</div>

So here those Material Assets??? in german

maybe someone knows how to pick them?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/a/6a78871313eade0d8b42c385fbce49a73d104c29.png)

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [March 1, 2017, 9:38am UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/9 "2017-03-01T09:38:32Z")

</div>

oh i forgot,  
you need the JBE package (Eraser)  
i use Dynamo 1.2

---

<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:** [March 1, 2017, 1:01pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/10 "2017-03-01T13:01:17Z")

</div>

This maybe? (found through the search field):

> [@Purging Material Assests - mainly the appearance group](https://forum.dynamobim.com/t/purging-material-assests-mainly-the-appearance-group/9362/2):
>
> Hi @tlivingston There is a custom node from archi-lab package called “Material.MaterialAssestElement” will get you started. [image]

---

<div class="post-metadata">

**Author:** ![Yien](https://avatars.discourse-cdn.com/v4/letter/y/ecd19e/32.png) [@Yien](https://forum.dynamobim.com/u/Yien)\
**Post date:** [March 1, 2017, 1:44pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/11 "2017-03-01T13:44:31Z")

</div>

Ladislau,

I believe Assets are parts of materials.  
Once unused material is deleted, you must also purge the remaining assets.

Y

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [March 1, 2017, 10:24pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/12 "2017-03-01T22:24:46Z")

</div>

@Yna_Db thnx a lot!  
I’ll try next day…  
will show results later!

**ymmd!**

---

<div class="post-metadata">

**Author:** ![Greg\_McDowell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/greg_mcdowell/32/21011_2.png) [@Greg\_McDowell](https://forum.dynamobim.com/u/Greg_McDowell)\
**Post date:** [March 2, 2017, 12:18am UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/13 "2017-03-02T00:18:36Z")

</div>

Unused Materials come up with the standard Purge. What did I miss? Are you trying to make it part of a larger graph?

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [March 2, 2017, 5:53pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/14 "2017-03-02T17:53:26Z")

</div>

@Greg_McDowell  
Thanx, you didn’t miss anything,  
i just try to get rid of some controlled Materials (etc.) which seem to “grow” in my project file (lately 240.000!)  
named "Standard"  
and yes i could use the purge comand, but - in my case, it takes aprox 8-10h just find all unused !!!.. :-o  
so i try to focus on those nasty ones…

the aim is as well to be able to purge controlled elements, and choosing them before using the purge comand.

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [March 2, 2017, 6:19pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/15 "2017-03-02T18:19:26Z")

</div>

@Yien  
yes i know, but that is, when the “pain comes”…  
my file is aprox. 170 MB, so it takes about 2-3h just from clicking purge unuse \> till menu comes up…and the another big slice of time - just to uncheck all, and then try to check just the ones i whant to get rid of… omg!

what i dream of is as follows:

i want a way to **save** the things/elements/mats…etc. i want to purge **before** i actually purge them…  
becaus, sometimes i just want to get rid of - say - for ex. some dimensions i wouldn’t use…

next time i want to purge some other stuff…

maybe i get the idea.

the standard purge unused command is **not cusomizable** ,  
and thats want i try to do…

---

<div class="post-metadata">

**Author:** ![Greg\_McDowell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/greg_mcdowell/32/21011_2.png) [@Greg\_McDowell](https://forum.dynamobim.com/u/Greg_McDowell)\
**Post date:** [March 2, 2017, 8:02pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/16 "2017-03-02T20:02:01Z")

</div>

8-10 hours?!?!? That’s insane. How big is your file?

Something sounds very wrong here. 170mb isn’t that big. Mine are typically twice that and it takes no more than 20 seconds to bring up the purge dialog. Selecting 50-100 materials isn’t instantaneous but certainly no longer than opening the dialog in the first place.

I don’t know what to tel you. Good luck!

---

<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:** [March 3, 2017, 12:38am UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/17 "2017-03-03T00:38:52Z")

</div>

I’ve seen that happen when there are a ton of object styles that were brought in. This could be a result of CAD imports and the like.

---

<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:** [March 3, 2017, 11:16am UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/18 "2017-03-03T11:16:32Z")

</div>

@Ladislaus Check the size of your CAD files which you have in your model. It might also due to your CAD files have DGN Line Patterns those have got 1000’s of Line patterns that will come along when you Import/Link CAD file.

Is it possible for you to drop dummy rvt file?

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [March 3, 2017, 12:38pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/19 "2017-03-03T12:38:28Z")

</div>

@Ladislaus  
If this is a workshared file, you should be the onely one working with this file when purging. If not and another user saves to central, all your material will return.

Marcel

---

<div class="post-metadata">

**Author:** ![Ladislaus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ladislaus/32/22187_2.png) [@Ladislaus](https://forum.dynamobim.com/u/Ladislaus)\
**Post date:** [March 6, 2017, 5:11pm UTC](https://forum.dynamobim.com/t/delete-unused-materials/9936/20 "2017-03-06T17:11:23Z")

</div>

Hey guys, thank you a lot…!

actually i am hard at work…  
so i will reply to all of you later!

@m.rijsmus  
no it is not a workshaerd file… :-/

[Next page](https://forum.dynamobim.com/t/delete-unused-materials/9936.md?page=2)
