Reputation: 11
For our Revit addin (in c#), I need to get some room boundingbox (based on model values) For this I use element.Get_BoundingBox function, but it seems , the Z coordinates do not respect the base and limit offsets of the room for example, a room has a level to 0 coordinate, a base offest equal to -400.0, in this case the box.min.z value is 0 in place of -400.0
is it normal and I am missing some logical aspect , or is it a Revit problem ?
How can I find the right values (I know how to compute them by recalculating from levels and offsets , but I prefer if I can have the result by a direct api call)
thanks in advance
Luc
Upvotes: 0
Views: 948
Reputation: 1
At the beginning I also had the problem with offset bounding boxes to the level. After some searching I found the value. It is the difference between "Elevation" and "ProjectElevation". You can easily read them out at any level using the RevitAPI.
https://www.revitapidocs.com/2020/895ef506-bfea-cc4e-31f8-aad2af6672e4.htm https://www.revitapidocs.com/2020/b5d48a18-4aa9-7457-7a6a-6d4966eaf77f.htm
Upvotes: 0
Reputation: 8339
Please provide a minimal reproducible case, e.g., a model with one single room and a macro that reproduces the behaviour you describe. Please also add an illustrative image showing the room geometry and the level. If it is true, I will report it as an issue to the development team. Thank you.
Upvotes: 0