@andrea.settimi wrote:
Hello there!
I patched-up a small definition for printing a layout through python (I am fresh-new to coding in Python). Now, at the end, a pop-up window is popping up obliging for confirming by hitting the “save” button. This is quite an inconvenience since I am trying to keep everything automated. Does anyone have an idea how to deal with this?
Thank you in advance!import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rsx = fileName
y = fileFolder
z = toggleif z:
filename = rs.SaveFileName(folder = y, filename= x, extension=".pdf") pages = sc.doc.Views.GetPageViews() pdf = Rhino.FileIO.FilePdf.Create() dpi = 300 #just one printing: capture = Rhino.Display.ViewCaptureSettings(pages[2], dpi) pdf.AddPage(capture) pdf.Write(filename)
Posts: 18
Participants: 4