Building Information

Building Information

Anonymous
Not applicable
611 Views
7 Replies
Message 1 of 8

Building Information

Anonymous
Not applicable

Hello Everyone,

 

I am trying to fetch information regarding a building using the Revit API, but I have been unable to do till now. It would be appreciated if someone can help me with it or let me know if it is not possible at all.

0 Likes
612 Views
7 Replies
Replies (7)
Message 2 of 8

mhannonQ65N2
Collaborator
Collaborator

That really depends on what you are looking for. If you want the address, the building name, or something like that, you could use the ProjectInfo element. A decent rule of thumb is that if the information exists in the Revit model and can be read manually, then it probably can be accessed by the API.

0 Likes
Message 3 of 8

Anonymous
Not applicable

I am trying to fetch the building geometry and then associating it with the rooms present in each building. If you can share some ideas about whether it is possible or not.

0 Likes
Message 4 of 8

lukaskohout
Advocate
Advocate

Associate in which way?

Like getting some light fixture and copy it to specific rooms?


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes
Message 5 of 8

Anonymous
Not applicable

I was thinking of to fetching corner points of a building and then checking whether a room corner points are contained in the building's corner points 

0 Likes
Message 6 of 8

lukaskohout
Advocate
Advocate

Well as rooms have boundaries created by walls of the building or room boundary lines, is it not obvious that the room is in the building?

Or do you have more buildings in one project and you want to determine if the room is in building A not building B?

Or you want to check if there are some unclosed rooms?


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes
Message 7 of 8

Anonymous
Not applicable

Yes, there is more than one building in the project. My task needs to get an idea of to which building a room belongs.

0 Likes
Message 8 of 8

lukaskohout
Advocate
Advocate

Well in that case, I guess one wayto do this is:

- select the boundary walls of the building manually

- create a close outter curve from the walls in selection

- get the points from room boundary

- for points of the room boundary check if they lie in the polygon created by the wall curve. If you find at least one point inside then you have proof that the room lies in the building boundary. Use this link to determine the point position (there is even a c# example):

https://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/

 

And of course the easiest way is to have parameter e.g. BUILDINGCODE in the room, which will the architect or engineer fill. Than you do not have to use analytical geometry to determine the position.

This can be done by multiselection for the whole floor.

But of course I do not know how many buildings, floors and rooms you have in the project.


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
0 Likes