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.