I am new to revit API and I have been able to get the walls within the room using a Room's GetBoundarySegments with the SpatialElementBoundaryLocation option.
My aim is to get all the dead ends in the corridor Room and the closest doors to each dead end if there are multiple dead ends in the corridor.
Any help or code examples is highly appreciated. Thanks