Cross Lacing Lists of Different Data Types

Howdy,

First time poster, and I need some help. Been scratching my head at this for a while.

I have two lists. The first is a list of rooms in Revit, and the second is a list of points in the xy plane.

Essentially, I want to check each point with every room to see if the point is located inside of a room. I’ve already done that by cross-lacing Room.IsInsideRoom.

But now I want a combined, boiled-down list of rooms + points where that condition is true. I think I can use List.FilterByBoolMask, but I need a cross-laced list of equal length to mask with my boolean values.

Any thoughts?

Room.IsInsideRoom as you have it laid out is generating a list of booleans structured for each room. Presumably, each sublist should only contain one true output.

You could then use a combination of IndexOf, searching for True outputs, and GetItemAtIndex, using the indices of ‘True’ to pull out the corresponding point from your initial points list. This would produce a list of points matching the list of rooms.

From there, you can combine lists if needed.

Try use L2 in mask:

And see this for proper filtering of two lists at once: