get_BoundingBox drastically slows down my script

Hello,

I have created a post in Revit API forum, but also decided to check here with pyRevit community if possible.

I use the below to get a bounding box of a titleblock schedule on a sheet. This particular bit drastically slows down my script. If I hard code XYZ coordinates, then the script runs no more than 10 seconds. If I use the below, it takes around 5-6 minutes. Does anyone know if there is more efficient way of getting a bounding box?

bounding_box = schedule_instance_element.get_BoundingBox(picked_sheet)

Are there other views on the sheet?
If you run it without any links loaded does it have the same issue?
Do you get an accurate value if you pass in “None” instead of “picked_sheet”?

I assume it’s taking so long because it’s regenerating the sheet that it’s placed on when getting the bounding box.

Hi @VitalijM
I see you also posted to the autodesk forum and got a solution.

Linking it here in case somebody else needs it

1 Like

@martin.servold, thank you for the reply. I got a reply in Revit API forum which works for me.

1 Like

@sanzoghenzo. I was planning to do what you have done when my couple of hectic weeks are over. Thanks for taking care of it for me.

2 Likes