Hi,
I’ve pasted code below that I use to create a PDF document for all of the layouts in a file. I want to know how I can control the line width property. My prints using this code have a hairline line width which does not display well. I believe the code just defaults to whatever the layers are set to, in this case Default>
I want to set the line width as if setting this value in the print dialog:
import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs
drawName = rs.DocumentName()
path = rs.DocumentPath()
drawName = drawName.replace(".3dm","")
if drawName:
filename = rs.SaveFileName("Save Layouts to PDF", "PDF Files (*.pdf)|*.pdf||",path,drawName)
else:
filename = rs.SaveFileName("Save Layouts to PDF", "PDF Files (*.pdf)|*.pdf||")
pages = sc.doc.Views.GetPageViews()
pdf = Rhino.FileIO.FilePdf.Create()
dpi = 600
for page in pages:
capture = Rhino.Display.ViewCaptureSettings(page, dpi)
pdf.AddPage(capture)
pdf.Write(filename)
import os
os.startfile(filename)