# Deleting line pattern

**URL:** <https://forum.dynamobim.com/t/deleting-line-pattern/53662>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [August 3, 2020, 1:00pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662 "2020-08-03T13:00:28Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehrdad610](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mehrdad610](https://forum.dynamobim.com/u/mehrdad610)\
**Post date:** [August 3, 2020, 1:00pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/1 "2020-08-03T13:00:28Z")

</div>

hi guys , I want to delete all line styles which was imported from AutoCad files into our revit file , I try to find some nods that pave the way for me to run the script of deleting line pattern in revit.  
is there any recommendation ? although there is one way in the forum , i didn’t understand how it was work !!!

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 3, 2020, 1:02pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/2 "2020-08-03T13:02:30Z")

</div>

You don’t need dynamo.

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

---

<div class="post-metadata">

**Author:** ![mehrdad610](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mehrdad610](https://forum.dynamobim.com/u/mehrdad610)\
**Post date:** [August 3, 2020, 1:17pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/3 "2020-08-03T13:17:10Z")

</div>

i don’t have any things in here but there are lots of line pattern in additional setting \> line pattern !!!

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 3, 2020, 1:37pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/4 "2020-08-03T13:37:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/3/13795dbcaa025bf037e5a3e2271b98362014da3e.png)

Be careful.

---

<div class="post-metadata">

**Author:** ![mehrdad610](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mehrdad610](https://forum.dynamobim.com/u/mehrdad610)\
**Post date:** [August 4, 2020, 7:02am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/5 "2020-08-04T07:02:55Z")

</div>

ThanK you for your kindness BUT i don’t see Element.Delete NOD , is there anyway that i can find it or take it !

---

<div class="post-metadata">

**Author:** ![d.kuurman](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@d.kuurman](https://forum.dynamobim.com/u/d.kuurman)\
**Post date:** [August 4, 2020, 7:12am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/6 "2020-08-04T07:12:10Z")

</div>

I believe the Element.Delete node is from the archilab package.

---

<div class="post-metadata">

**Author:** ![mehrdad610](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mehrdad610](https://forum.dynamobim.com/u/mehrdad610)\
**Post date:** [August 4, 2020, 7:12am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/7 "2020-08-04T07:12:43Z")

</div>

yes should i install this package on Dynamo ?

---

<div class="post-metadata">

**Author:** ![mehrdad610](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mehrdad610](https://forum.dynamobim.com/u/mehrdad610)\
**Post date:** [August 4, 2020, 7:50am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/8 "2020-08-04T07:50:19Z")

</div>

![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/a/0ae3b127a70ca1def19306c677fb60b93c2b5a70.jpeg)  
I dont know it didn’t work for me

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [August 4, 2020, 7:53am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/9 "2020-08-04T07:53:54Z")

</div>

You must delete the elements and not their names :

 ![delete](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/3/5352fe8642477285e21bbdc6707e1147306c7ec0.jpeg)

---

<div class="post-metadata">

**Author:** ![mehrdad610](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mehrdad610](https://forum.dynamobim.com/u/mehrdad610)\
**Post date:** [August 4, 2020, 8:15am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/10 "2020-08-04T08:15:31Z")

</div>

![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/6/46e23d0327c6a915463a806e5377116dbbaa8737.jpeg)  
yes its correct but it doesn’t any changes in revit line pattern . i still have all of them

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 4, 2020, 9:49am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/11 "2020-08-04T09:49:59Z")

</div>

> [@mehrdad610](#):
>
> l this p

Are the ones you’re trying to delete called IMPORT … ?

I just put the word IMPORT in as an example.

Also, if each linetype has a different name and there are not similarities why use dynamo. Use Revit to delete!

---

<div class="post-metadata">

**Author:** ![mehrdad610](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mehrdad610](https://forum.dynamobim.com/u/mehrdad610)\
**Post date:** [August 4, 2020, 10:09am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/12 "2020-08-04T10:09:47Z")

</div>

yes you right but i think that there is anyway to delete all of the line patterns with any names they have , there are too many pattern which loaded into our project

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 4, 2020, 12:39pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/13 "2020-08-04T12:39:19Z")

</div>

You don’t want to delete every, single line pattern surely?!

If you do… just plug the line patterns into the delete node

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

I strongly suggest you don’t do this.

---

<div class="post-metadata">

**Author:** ![daniel.santos](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@daniel.santos](https://forum.dynamobim.com/u/daniel.santos)\
**Post date:** [March 17, 2021, 1:33pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/14 "2021-03-17T13:33:49Z")

</div>

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

This is one method that allows delete Line Patterns in the model by name. In case of AutoCAD Line Patterns, you can just search by “IMPORT” names and delete them.

---

<div class="post-metadata">

**Author:** ![bayowindapo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bayowindapo/32/184532_2.png) [@bayowindapo](https://forum.dynamobim.com/u/bayowindapo)\
**Post date:** [March 2, 2022, 7:20am UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/15 "2022-03-02T07:20:15Z")

</div>

Pyrevit is also a great option for this.

---

<div class="post-metadata">

**Author:** ![Ryan.GormanKT36T](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ryan.gormankt36t/32/171167_2.png) [@Ryan.GormanKT36T](https://forum.dynamobim.com/u/Ryan.GormanKT36T)\
**Post date:** [November 2, 2023, 6:05pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/16 "2023-11-02T18:05:22Z")

</div>

Thank you all for your comments on this post!! While the Script itself is a nice time saver, working through the reasoning and why some of the earlier examples didn’t work was the real winner for me, super helpful. I feel like a Kindergartener who just traced his first letters! this one is going on the fridge for a while! LOL

---

<div class="post-metadata">

**Author:** ![Ryan.GormanKT36T](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ryan.gormankt36t/32/171167_2.png) [@Ryan.GormanKT36T](https://forum.dynamobim.com/u/Ryan.GormanKT36T)\
**Post date:** [November 2, 2023, 6:09pm UTC](https://forum.dynamobim.com/t/deleting-line-pattern/53662/17 "2023-11-02T18:09:28Z")

</div>

Here was my final version.

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

Before:

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

After:

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

Not sure why it ignored the "IMPORT"s that had a colon, but still went from 50++ to 6
