AnsweredAssumed Answered

How to set papersize for Solidworks application

Question asked by Ross Hazelwood on Mar 18, 2019
Latest reply on Mar 22, 2019 by Ross Hazelwood

In 2018 SolidWorks API there are tools to set PageSize for a specific document (via Modeldoc2.pageSetup or Sheet.pageSetup, but I cannot find a way to set the Solidworks system print size for the overall application, just like the to preferences circled in green on the interactive dialog below.


It there a way to do it directly, or must we fudge it by temporarily setting preferences in ModelDoc2.PageSetup API, and then temporarily print "using document settings" before resetting preferences back to "use system settings" equivalent to the picture.


So far I have not found any API that allow me to to set the two values shown. I am aware that the size option will be derived from the actual printer in use and its PrinterSettings object as every printer has its own order and enumeration of sizes.


The purpose is a print macro that uses regular settings same as interactive use of SolidWorks, rather than by document settings if this can be avoided. Document setting also store these options but our printers often changing name or hardware, so it is a less desirable method.

Others have asked before in versions 2013, 2015, but answer has not yet been forthcoming.