Bug report: Layout/Page creation params ignored

Creating pages are broken: all parameters are ignored (title, width, and height). The page created always has title: Viewport, and size A4 in portrait mode. (maybe this is different in other locales)

Neither rhinoscript nor RhinoCommon works.

# Rhinocommon
# all params are ignored here
pageview = scriptcontext.doc.Views.AddPageView("A0_{0}".format(page_number), 2000, 1000)

# this works
pageview.PageName = "mypage"

# but this is still ignored
pageview.PageWidth = 2000
pageview.PageHeight = 1000

# Rhinoscript
# all params are ignored here
rhinoscriptsyntax.AddLayout(title="mypage", size=[2000, 1000])

If anyone knows a workaround I’d love to hear it.

1 Like

Hello - I see that it does not work right… I get somewhat different result from what you describe, but not the expected ones. Thanks for the report.

https://mcneel.myjetbrains.com/youtrack/issue/RH-53159
https://mcneel.myjetbrains.com/youtrack/issue/RH-53160

-Pascal

1 Like

Hi @pascal and @stevebaer

I’m running into this again. I know you’ve done a lot of new stuff with Layouts in wip7, but are there any chance this will be fixed in v6?

Best,
Aske

Hard to say. It is on my list of items to fix, but I’m not sure exactly when I’ll be able to fix this.

Ok, thanks for the reply!
Are there any workarounds I can use?
Does it work as expected in wip7?

Nevermind. Found the answer:

_-Layout "Mylayout123" 297 210 0 _Enter

works I guess. Then I just need to grab the newly created layout so I can use it in RhinoCommon.