I am currently creating a solution for batch printing. I’ve got 32 layouts in Revit project, each has different name, paper szie and orientation. The script makes it possible to assign special parameters to each layout during the printing instantly, instead of making it manually. Currently i’ve got 10 general paper sizes, each is not standard. I’ve created them through “Print server setting” manually.
Now i want to make the script being able to grab width and height parameters directly from the Title Block and provide them to PostScript Custom Paper Size. When i specify the paper szie name “PostScript Custom Paper Size” the script finds it properly, but next it, hypotheticly, should ask the user to provide the W and H values. So that the script crashes.
` currentformat = printManager.PrintSetup.CurrentPrintSetting.PrintParameters.PaperSize print(currentformat.Name) #set paper size pss = printManager.PaperSizes for ps in pss: if ps.Name.ToString() == SheetFormat[i] and currentformat.Name != ps.Name: printManager.PrintSetup.CurrentPrintSetting.PrintParameters.PaperSize = ps currentformat = ps print("Format is found: " + SheetFormat[i]) printSetup.Save()
Is there any kind of API to get “PostScript Custom Paper Size” class/object and set its members through some method? I couldn’t find anything clear about it. So i hope someone has an idea how to deal with it
batch_printing.gh (17.6 KB)