Hi guys,
How can I get adjacent walls as a separate list in Revit? For instance, I selected a wall and I want to find walls that are either intersecting or adjacent to selected wall. An example would be something like this👇:
If I understand your question correctly, I might be able to help a bit.
When working with intersections of elements, I like to keep it as simple as possible to ease the processing of the script. I find intersections of curves to be better and faster than intersection of breps.
I have used the center curve of the walls to test the intersection, and it seems to work alright. It will however not work if the walls are disallowed to join in Revit.
This is just quickly put together, so there might be some improvements to be made. It might also not work correctly when selecting multiple walls to test. There could be some data structure to figure out there, I’m not sure.
I didn’t really understand why to use this method @Japhy. The wall I selected is a separate wall, not a layer. At where I work, finish and core walls are separately created.
I guess to find parallel walls you will need to set some parameters. Do you want every wall in a certain radius? or all parallel walls in the project (which might be the first step anyways)
To get all parallel walls you will need to get the location line and compare vectors (flipping any negative vectors first)
I am not looking for parallel walls @Japhy. I am trying to get adjacent/adjoining walls. Walls that are next to each other, sharing a face. I thought an intersection method would find it but it didn’t work since they don’t really intersect (somehow?).
An example might be the image below. These walls are adjacent to each other but they don’t have an hard intersection(like the one in the end).
Think of it like a line navigation problem. One native way is the point groups (sets the radius of point groups) or start getting into network relationships like those in Heteroptera