PDF Creation - Control Line Width

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:
image

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)

You need to set a different default line width on the ViewCaptureSetting instances that you create in your script.

Steve,

Thanks for the quick reply. That will work for me.

Eric