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.
- the automatic printing stops and ask to confirm the single layout.
( error- no autoprint- nofocus on layout.jpg )
- 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”
rs.Command(actlay)
cmd=”-_SaveAs " + a.PageName + ".pdf " + “_Enter”
rs.Command(cmd)
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,
Fabio