Filtering Family Types from Category of elements not placed in project

Hi all, I’m still green on lists and understanding them, so apologies for this very basic question. I looked at other topics and couldn’t find an answer, so maybe someone can help me if I make my own post.

I am simply trying to pull out a list from all the mechanical equipment that is loaded in a project (but not placed) that use the name “SDV SIZE”. When I did it the way other forums showed (which are now closed, so I can’t comment), I end up with a bunch of “false” and an empty list. Could someone please show me what is wrong? Thanks!

I use English is not good, so you probably will understand the problem through the following example.

If you put a watch node after your String from Object node, you will see that the string starts with Family Type: not SDV that is why all of your results are false.
Just change the code block to “Family Type : SDV SIZE” this should now do what you want. Alternatively you split the string at " : ", and use list map to get the second item in each list, ie. the family type name without “Family Type :”, at the start. Or you could Just swap the Sting.StartsWith node for a String.Contains node.

Thanks Darren, I’m close, your first suggestion of changing the code block to “Family Type: SDV SIZE” worked, however I would like to do the “split” as you said, but I just don’t know what you mean by that (yes, I would like to show just the family type name without the “Family Type” at the start). Essentially, this is what I am trying to “condense”:

The purpose of this whole graph (the rest of it is too large to show clearly in one image) is to have dynamo read the calculated air flows, and then switch the terminal boxes to correct sizes. It works as it is, but currently it looks like this (and I know you can’t read the nodes in this image haha), and I have a feeling I can make this easier for my mech group so that they don’t have to keep selecting individual family types:

Have a look at the image below, this shows how to split the strings as you want.

1 Like

Also Revit have a function call Purge Unused can easily find the not placed Family.

A bit of a late reply on this, I ended up getting too busy to come back to it till now.
I tried the nodes that you showed, but at the List.Map, the watch node came out “empty”. I did, however, sort of combine some elements of your last solution with what I was already working with, and managed to get it to work, as shown in the image below. So, success on the original question, finally! However, it now fails when I connect it to the rest of the giant graph below :frowning:

I can’t tell what the exact problem is because I cannot see the entire script, I suspect it is to do with the fact that you are not feeding lists of the same length into the nodes.