![]() |
【转帖】printout2 problem
printout2 problem
i am having a problem using printout2. when i run the macro it prints all sheets of the drawing. i have set the pagearray to 0, but i still get all pages plotting. what am i doing wrong? see code sub main() dim printer as string dim pagearray(0) as long pagearray(0) = 0 set swapp = application.sldworks set model = swapp.activedoc set swdraw = model set swsheet = swdraw.getcurrentsheet call saveasjpg debug.print model.printer set ps = model.pagesetup size = swsheet.getsize(width, height) width = round(width * 39.36996, 2) height = round(height * 39.36996, 2) if width = 17 and height = 11 then model.printer = "engineering laserjet" printer = "engineering laserjet" ps.printerpapersize = bsize ps.drawingcolor = 3 ps.orientation = 2 end if model.extension.printout2 pagearray, 1, true, printer, "" end sub thanks bryan you have to specify the array in doubles, so from-to, from-to. you need to set it to 0, 0. not just 0 (or possibly 1, 1 not sure if its zero or one-based index) |
所有的时间均为北京时间。 现在的时间是 06:38 PM. |