Remove an Item from Sublist



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

RemoveIfNot Double

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.


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


Hi @karthi1015 @JacobSmall @daninet

Just use RemoveIfNot node:


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?


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


I did the same its not working for me


List Levels worked for me…


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:

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.


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

Elevation by Curve Room Finish Issues

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



it worked thanks. can you help me with this post