How to change the printer of a layout using code

Hi,

I have a 3dm File with several layouts and want to assign indivicual printers to them.
Is there a way to change the Printer of a page view through .Net

Thanks,
Martin

Hi Martin,

It doesn’t appear so. I’ve added a wish item for this.

https://mcneel.myjetbrains.com/youtrack/issue/RH-36157

– Dale

Hi @MartinIC,

not sure if this helps until this feature gets implemented, but you could write your own Print command which queries a pre-assigned user data value from the layout for the desired printer and then use a scripted _Print Command to set the printer name before each print starts. I have one old script to get the available printer (names) collection using:

System.Drawing.Printing.PrinterSettings.InstalledPrinters

c.

1 Like

Hi Clement,
thanks - I’ll try that.

-Martin