# Remove an Item from Sublist

**URL:** <https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576>\
**Category:** Lists-Logic\
**Tags:** dynamo\
**Created:** [January 29, 2018, 6:50am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576 "2018-01-29T06:50:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthi1015](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@karthi1015](https://forum.dynamobim.com/u/karthi1015)\
**Post date:** [January 29, 2018, 6:50am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/1 "2018-01-29T06:50:07Z")

</div>

How to remove arcs from this sublists and get only lines out.

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

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 29, 2018, 6:57am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/2 "2018-01-29T06:57:38Z")

</div>

From your current list of objects:  
Get the object type.  
Test that for equal to line.  
Use that as a mask input, and the current list of objects as the list input for a list.filterbyboolmask node.

Lacing and levels will matter here.

---

<div class="post-metadata">

**Author:** ![daninet](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@daninet](https://forum.dynamobim.com/u/daninet)\
**Post date:** [January 29, 2018, 8:15am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/3 "2018-01-29T08:15:47Z")

</div>

if you have multiple type (point, line, arc) and you only want to remove arc do the following:

string from object node  
string starts with and test it for "Arc"  
filter by boolean mask, mask is your test, list is your flattened list from the screenshot

filter by boolean has two output, “in” gives the true list, “out” gives the false list. This case you need the “out” to get the list w/o the arc

---

<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:** [January 29, 2018, 8:32am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/4 "2018-01-29T08:32:06Z")

</div>

Hi @karthi1015 @jacob.small @daninet

Just use RemoveIfNot node:

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

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [January 29, 2018, 8:47am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/5 "2018-01-29T08:47:09Z")

</div>

Haven’t tried RemoveIfNot but for it to work in sublist, would you have to make the list input @L2 or does it work without it?

---

<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:** [January 29, 2018, 8:56am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/6 "2018-01-29T08:56:30Z")

</div>

> [@kennyb6](#):
>
> would you have to make the list input @L2 or does it work without it?

@List levels seems to have issues but you could work it out by using List.Map node 🙂

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

---

<div class="post-metadata">

**Author:** ![karthi1015](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@karthi1015](https://forum.dynamobim.com/u/karthi1015)\
**Post date:** [January 29, 2018, 4:20pm UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/7 "2018-01-29T16:20:58Z")

</div>

I did the same its not working for me  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/0/90f7755401ab4606806e41a940abe6e5d65d4044.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:** [January 29, 2018, 11:59pm UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/8 "2018-01-29T23:59:07Z")

</div>

List Levels worked for me…  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/c/6c725e31a84f40d4f16efe315e4a57846d0ee9c2.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 30, 2018, 12:29am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/9 "2018-01-30T00:29:27Z")

</div>

My guess: You’ve got an empty list in there.

Notice that the list structure is different than what has been recreated by others. Your previous node is a Room.FinishBoundary, which (unless you’ve cleaned up your rooms and/or filtered by area \> 0) will return an empty list for rooms which are not placed or have duplicate boundaries. Empty lists usually causes dynamo great pain to the point where it returns an empty list entirely, errors out, or initiates the singularity. Ok that last one isn’t true. This solution should work without having to fight levels, bad data structure, empty lists, or T2000:

 ![Remove%20an%20Item%20from%20Sublist](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/00cc87bbcc3347108a8f7259e612da620e09841b.png)

Note that while this may work, you’ll still have an empty list on the other end which has a matching index relative to the bad data on the input. This may be ideal for you. This may be a horrible for you. Depends on what you’re after and where you are. Post a full data set (revit model and dyn) if you need more help/guidance.

---

<div class="post-metadata">

**Author:** ![karthi1015](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@karthi1015](https://forum.dynamobim.com/u/karthi1015)\
**Post date:** [January 30, 2018, 2:59am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/10 "2018-01-30T02:59:42Z")

</div>

you can check this new post for full script. Thanks for helping me so far.

> [@Elevation by Curve Room Finish Issues](https://forum.dynamobim.com/t/elevation-by-curve-module-11-room-finish-issues/18610):
>
> Elevation by Curve Jeremy Graham Module 11 This is a dynamo file created by Jeremy Graham in his website [image] I need few changes in this script In my project file I have curved walls and Walls with profile causing issues with running this script. its getting arc’s as a room finish boundary stops running the script. It would be great if anyone could modify the python script or filter the list to get views [image] You can download the file and check it here [http://learndynamo.com/downlo…](http://learndynamo.com/download/678/)

---

<div class="post-metadata">

**Author:** ![andre.abotnes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andre.abotnes/32/42003_2.png) [@andre.abotnes](https://forum.dynamobim.com/u/andre.abotnes)\
**Post date:** [January 31, 2018, 11:37am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/11 "2018-01-31T11:37:32Z")

</div>

My Guess: You have a list of lists. If you put a code block with “a[0]” between the watch node and the list.map node, this might just work.

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

A

---

<div class="post-metadata">

**Author:** ![karthi1015](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@karthi1015](https://forum.dynamobim.com/u/karthi1015)\
**Post date:** [February 1, 2018, 12:08am UTC](https://forum.dynamobim.com/t/remove-an-item-from-sublist/18576/12 "2018-02-01T00:08:42Z")

</div>

it worked thanks. can you help me with this post

> [@Elevation by Curve Room Finish Issues](https://forum.dynamobim.com/t/elevation-by-curve-module-11-room-finish-issues/18610):
>
> Elevation by Curve Jeremy Graham Module 11 This is a dynamo file created by Jeremy Graham in his website [image] I need few changes in this script In my project file I have curved walls and Walls with profile causing issues with running this script. its getting arc’s as a room finish boundary stops running the script. It would be great if anyone could modify the python script or filter the list to get views [image] You can download the file and check it here [http://learndynamo.com/downlo…](http://learndynamo.com/download/678/)
