Rhino 6 Automatic print Layout Bug

Hi Steve,
sorry to disturb again.
I found another problem with the Layout printing.
I automated the printing in Rhino 5 and everything works well.

When I try to print with Rhino 6, the same code, the same file and the same Pdf Creator ,
It doesn’t work.

  1. the automatic printing stops and ask to confirm the single layout.
    ( error- no autoprint- nofocus on layout.jpg )

  1. the focus on the layouts ( _SetActiveViewport )seems to work.
    how you can see in " error- no autoprint- nofocus on layout.jpg " , it is on Layout 9,
    but the printing window remains on the first Layout (02 in this case) and prints the Layout 2
    with the name 05, 07, 09, 22.

I attach a print-screen showing how I set Pdf Creator 1.4.0 to automatic printing.
( PdfCreator 1.4.0 config.jpg )

Using Rhino 5 It works correctly and sends the files into the correct directory (…\stampa)

Using Rhino 6 It stops,ask to confirm the single layout and sends the (wrong)file into the same rhino

file directory.

To launch the print I created a button with this macro:

! _-RunPythonScript “F:\Rhino Lavori\2018 - Cantiproject\Print_Layout.py”

The Python script is:

import rhinoscriptsyntax as rs
import scriptcontext as sc

page_views = sc.doc.Views.GetPageViews()

for a in page_views:
actlay = “-_SetActiveViewport " + a.PageName + " " + “_Enter”
cmd=”-_SaveAs " + a.PageName + ".pdf " + “_Enter”

I attach the Bug automatic Layout Printing.zip file with inside:
Rhino 5 .3dm file and the correct printed pdfs.
Rhino 6 .3dm file and the wrong printef pdfs.
The python Prin_Layout.py

Bug automatic Layout Printing.zip (730.6 KB)

Thanks in advance for your help,

Hi Fabio,
You might want to check out this post as an alternative way to print individual PDFs in V6 from python

Hi Steve,
thanks for your reply. The script was very useful.
So thanks to Jorin Chi too.
I have to change only the value of the size to “size = System.Drawing.Size(11.69dpi,8.27dpi)” and the print folder.
For me it work OK.