Hi All,
I want to generate the rooms adjacency matrix to capture the topology of all the rooms in the design. For this purpose, two matrices are to be created i.e., H_Tree and V_Tree.
Each row in the H_Tree matrix relates to the state of the rooms and is filled with values 1 (for rooms at the right side) and 0 otherwise.
The H_tree for the attached design is:
H=[0 0 0 0 0 … //Room 2 has no room at the right side 1 0 0 0 0 … //Room 1 is at the right side of the room 2 0 0 0 0 1 … //Room 5 is at the right side of the room 3 0 0 0 0 1 … 1 0 0 0 0 …]
Similarly, the V_Tree relates to a similar matrix where the values 1 refers to rooms at the top of the given room and 0 otherwise.
To simplify the situation, I am considering rooms with just four walls towards the east, west, north, south.
Can someone guide me how to achieve this functionality?
Any reference to the related Revit API functions will be of great help and will be highly appreciated.
Many Thanks and Kind Regards
Bilal