Layout : Zoom extents on details workaround (python)

Hi,

I try to zoom objects in a detail programmatically to generate a large number of layouts.
I try to avoid the use of the UI but I was forced to activate a detail to be able to make changes to its viewport.
In the provided code, while using RhinoDetail.Viewport, it doesn’t work. But if you comment out the line #27 using ActiveViewport it can apply the changes.
test_zoom_extents.3dm (160.6 KB)
test_zoom_extents.py (1.1 KB)

  1. Why RhinoDetail.Viewport is not equivalent to ActiveViewport ?
  2. Is there a way to do viewport changes without activating the detail ?

Regards

Not that I know of.

https://mcneel.myjetbrains.com/youtrack/issue/RH-69786

– Dale

Thank you.