Bounding Box of Section Box Min/Max Pts Z values don't correspond with model elevation

@Yna_Db when you ran my code, did you run it on multiple (more than 2) views? I ask this because I’m speculative that the X and Ys are reordering themselves. I threw together a sample file from a project someone did as a practice exercise, and added a view set similar to what I am working with, and I am experiencing similar X and Y discrepancies in the output.

Here is a link to a share folder with the .dyn and the sample .rvt file (Revit 2018) if anyone would like to take a look at the results I am describing in the Project environment rather than the image I attached above: https://drive.google.com/drive/folders/0B0AklWssfl05bXVKSVdQeFo0eXc?usp=sharing

I think I ran it on 2 views only. Unfortunately, I don’t have Revit 2018 installed (and I work in metric), but I’ll keep that for later :slightly_smiling_face:

1 Like

Drats, thank you anyway @Yna_Db - I will try to throw together a 2016 version when I have the time. If you have time at some point, I’d appreciate if you could see how the code runs on more than 2 views; no worries if you don’t have the time, I already am very grateful for you pointing me in the direction of the Transform property.

I do believe there is mismatching occurring with the output of views and the output of bounding boxes. Maybe someone might have some insight on the order of outputs from a Python code in general.

With 3 views and only a Z tranform, I also get a diplacement in the XY plane:


But if I use your complete code with X and Y transforms, everything is at the right place…

Thanks for giving it another try with more than 2 views @Yna_Db , mysterious results. It seems the views that are displaying incorrect bounding boxes have rotated section boxes because this is a circular building… I think this may be an issue but wouldn’t explain for the mismatching I experienced with my sample file… will do some more investigation during my lunch hour and report back.

Just verified: this code does not work if the section box has been rotated. I’ll look into whether or not I am able to obtain the rotation of a section box within the Python code before I obtain its bounding box element; I have a feeling this may be unobtainable from what I see in the API Docs. But any suggestions or points in the right direction are welcome :slight_smile: Thanks all to have contributed already - and thank you @Yna_Db for helping me solve the initial problem of the z outputs not corresponding with the model coordinates!

2 Likes