Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5870

Avoiding Print Pop-up Window

$
0
0

@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 rs

x = fileName
y = fileFolder
z = toggle

if 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

Read full topic


Viewing all articles
Browse latest Browse all 5870

Trending Articles