Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Script for print multiple sheets

2 REPLIES 2
Reply
Message 1 of 3
MichalHakel_SP
223 Views, 2 Replies

Script for print multiple sheets

Hello,

I would like to ask you if it is possible to create script for multiple sheet printing directly from Revit on plotter.

 

I use to insert 4 types of paper roll into my Canon IPF770 plotter - 297mm, 420mm, 594mm and 914mm.
For every sheet/layout in AutoCAD I set up size in "Page Setup Manager".

Then I insert paper roll with height of 297mm into my plotter, click on "batch plot" select all sheets with "297" in name, change "Publish To": "Plotter named in page setup", change how many copies I want to print and click on publish.

 

Thanks to this approach I can directly print all my sheets with height of 297mm on my plotter (no matter what is the lenght of my sheets).

I do the same for my sheets of height 420, 594 and 914mm.

 

It means I can print directly from AutoCAD to my plotter multiple sheets in multiple coppies I need.

 

In Revit there is no "page setup manager" so I have no option to set it up and then print. Revit sheet size is bounded by (for isntance) rectangle of my sheet edges. When I export to PDF, Revit can auto detect this size of my sheet and create PDF correctly by that size. However, when I want to print directly on my plotter, there is no option to set up "auto detect Revit sheet size" on my plotter.

 

Is it possible to have a script that can set this up correctly please ? To achieve that I insert my 297mm paper roll into my plotter and print all my sheets which height is 297mm no matter what lenght of those sheets is ? 

 

Thank you in advance

 

2 REPLIES 2
Message 2 of 3
Moustafa_K
in reply to: MichalHakel_SP

Not sure if I was able to comprehend your needs correctly, so you want to print in a group of sheets that have similar Height or width (depending on the orientation) ?

 

see if the below might help.

@MichalHakel_SP wrote:

In Revit there is no "page setup manager" so I have no option to set it up and then print. Revit sheet size is

 


Have you tried PageSize property in PrintSettings?

a very minimal example Code:

 

 

var printManager = Doc.PrintManager;

var printSet = printManager.PrintSetup.CurrentPrintSetting;
printSet.PrintParameters.PaperSize = printManager
    .PaperSizes.OfType<PaperSize>()
    .First(o => o.Name == "A3");

 

 

 

you also have view ViewSheetSetting, by which you can use to group all sheets of the sizes you prefer to print in a batch, similarly to what you experienced in CAD

 

 

printManager.ViewSheetSetting

 

 

 

 

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
Message 3 of 3

Interested in batch processing, scripting, automatically handling multiple documents? Have you checked the RBP?

 

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report