How to filter a list of lists

I am trying to gather all instances of a group of filled regions in one list. I have created a list that has grouped every filled region by type in my model, but I can’t figure out how to extract just a few group lists into a new list. I am hoping to get list 55-58 into a new single list.

Hi @Benjamin_Fields, is there a common string of text that only exists in the lists that you are trying to extract?

I was able to combine the list, but now I see that I inadvertently created a string rather than an element list. I would like to transcribe the area of the filled regions selected into a shared parameter in the model to create a schedule. Is there any way to move from a string list back to an element list? Or did I do this completely wrong to begin with?

You are very close. Plug in a new Element.GetParameterValueByName into All Elements of Type and add Area (I think) to the parameter name. Then switch the result with the input for List.FilterByBoolMask.

I think I am almost there. I have a list of areas for each of the filled regions I am trying to assign, but I am getting an error when I try to write them to a shared parameter. See the images below.

Area%20By%20Name_2

You’re filtering the parameter values instead of the elements and you’re missing the element input for your last GetParameterValueByName.

@Benjamin_Fields, this node is usually for applying a parameter value to a particular family. If you are trying to build a schedule, this seems like an interesting approach.
Have you considered outputting a text list that just looks like a schedule, or are you trying to update a custom detail family with a new list of areas? Both ways are possible, but the second requires more setup.
Did you upload a shared parameter to the project itself?

Thanks for the help everyone. I was able to figure out how to create what I was looking for. The script will read the area of the filled regions that I specify and then report those areas to a shared parameter so I can create a schedule that I can track my window wall ratio for energy calcs with. Here is the final script. Hope it is helpful.

1 Like