room boundingbox and offset problem

room boundingbox and offset problem

luc.vallotP8MJ4
Contributor Contributor
870 Views
2 Replies
Message 1 of 3

room boundingbox and offset problem

luc.vallotP8MJ4
Contributor
Contributor

hello,

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)

attached, a demonstration c# project and a test rvt file inside

 

thanks in advance

Luc

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

Anonymous
Not applicable

Hi,

 

have you checked against the transform property, sometimes bounding boxes are at 0,0,0 coordinate with a transformation and sometimes they are where the object is. https://www.revitapidocs.com/2016/297887ab-69bb-548e-cfb6-a3a23f410604.htm

0 Likes
Message 3 of 3

luc.vallotP8MJ4
Contributor
Contributor

Hi,

transform is an identity one
with origin=0,0,0

luc

0 Likes