AddPageView on mac always wrong size and orientation

When I use the following, on the mac the result is always an 8.5x11 portrait layout, no matter what is entered for the height & width in those variables. I decided maybe pageWidth was too close to PageWidth, so I also tried pageWidth = 11, pageHeight = 8.5 without luck. Unfortunately, hard to track down more details b/c I can’t get debugging to show any values on the mac, so I have no idea what’s going wrong.

pageview = sc.doc.Views.AddPageView(“Page {0}”.format(page_number), PageWidth, PageHeight)

Hey @phcreates,

Have you tried this sample code?

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_DocObjects_Tables_ViewTable_AddPageView_1.htm

Looks like width and height are in millimeters.

– Dale

Yes, on mac that creates a layout that’s 215.9 wide and 279.4 tall with a detail that’s 1169 wide and 801 tall (mm) (document in inches.)
Note that the code says to make a horizontal layout and the result is vertical and the wrong size.

And it works fine on PC.

Hi @phcreates,

Can you post a script, that I can run here, that works on Windows and not on the Mac?

Thanks,

– Dale

I’ll send it to you directly.

Hi @phcreates,

Thank you - this is most helpful.

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

– Dale

Also, related to that script, I can’t disable redraw at the places one would think, because the script won’t function at all if I do. I can’t figure out why.

RH-65134 is fixed in Rhino 7 Service Release 15

1 Like