Get if room is in area boundary

Get if room is in area boundary

SamBerk
Advocate Advocate
241 Views
2 Replies
Message 1 of 3

Get if room is in area boundary

SamBerk
Advocate
Advocate

Hi

 

How can I get with the C# Revit API if a room element is inside an area's boundaries?

 

By inside I mean if the room is completely inside or the edges are exactly at the same place.

 

Like:

bool isInArea = area.IsRoomInside(room);

 

Thanks

0 Likes
242 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

I would look at this as a 2D Boolean operation task. Several solutions to this are discussed by The Building Coder:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

SamBerk
Advocate
Advocate

Hi @jeremy_tammik 

I've solved it using your utils I've downloaded a while ago.

I can't find the exact URL now, if you can share it here I can mark it as the solution.

 

Thank you

 

SamBerk_0-1706732120198.png

SamBerk_1-1706732126193.png

 

0 Likes