How to filter elements by LIST as input?

Hi all

I have 2 filters created one list to get list of matching parameters other one to filter elements using list previously created

Can I do this ???

If I do o 1 by 1 it returns ok but if I feed as list I don’t get anything ???

How can I achieve this ???
Regards

Can you show us the rest of the script?

Hi Thanks for your time

See attached

Regar

ds

List.FIlterByBooleanMasks have to have the list of elements and the list of Booleans have to match in depth and structure. Yours don’t. This can be fixed by adjusting the lacing on the test (notice you’re using shortest on the of filters, or using a remove list from list node (I believe this is in Rhythm or Clockwork but I can’t confirm as my Revit is busy at the moment) instead of a filter method.

Better yet - your first filter by bool mask has the excluded elements in the out input. Just use that instead and reduce computation time (by halfing the number of calculations).

Hi Thanks for your time

id I do Lacing to longest on FilterByBoolen it gives me empty result

but if I do on string.contains I get some results but again not what im after.

All I want to do is use list that contains 21 item to be as filter to filter all items in model based on list 1

RegardsCapture1

The string contains lacing should be cross product not longest or shortest. You’re asking if “any of those values are any of these values,” not “is this value that value” 22 consecutive times.

You may need to transpose your list here - if it’s 22 items deep each time no need. If it’s 600+ items deep you’ve missed the boat.

After that you will need to use a list.contains node with longest lacing to find out if any of the sub lists contain true.

That should produce a mask that aligns with your element depth.

1 Like

Thanks for your time

Im start feeling that what I want its not possible.

Say Panel98 contains 20 studs and 2 tracks (But all family instances contains parameter “Panel98”)

So I have label (Tag) that contains this panel number .So im trying to use tag information to filter all family instances in view.

If I do one by one it works but when I come to multiple Panel number filtering it wont work

So list would never match in structure

Regards

It will, but you have to test it according to the right list. I’ll see if I can put a sample together this weekend.

Thanks looking forwards

Regards

Can you get me a dataset to work with? More time I’ll go into building that then making the graph.

Hi Thanks for your time

Sorry but I can not share files.

Give couple days ill create something on my machine at home then ill be able to share

Regards

Try using List.ContainsItem to check a list recursively for multiple values. You’ll get a boolean mask for each value checked which can be used with FilterByBoolMask with list levels.

3 Likes