The PrintManager object is used to configure the global print settings.
Namespace:
Autodesk.Revit.DB
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
Remarks
Global print settings include PrintToFile, CombinedFile, PrintToFileName, PrintRange, CopyNumber, PrintOrderReverse, Collate.
Once PrintManager is acquired from a document, changes of its global print setting properties are not automatically
applied toward the global print setting. Should the local setting be used, the user needs to call the Apply method.
If the user calls SubmitPrint methods, not only that printing will use the current state of properties of the (local) print manager,
but the setting will also be applied to the global settings.
Examples
Copy
C#
private void CreateAndPrintViewSet(Document document, ViewSet viewSet)
{
PrintManager printManager = document.PrintManager;
printManager.PrintRange = PrintRange.Select;
ViewSheetSetting viewSheetSetting = printManager.ViewSheetSetting;
viewSheetSetting.CurrentViewSheetSet.Views = viewSet;
viewSheetSetting.SaveAs("MyViewSet");
printManager.CombinedFile = true;
printManager.SubmitPrint();
}
Copy
VB.NET
Private Sub CreateAndPrintViewSet(document As Document, viewSet As ViewSet)
Dim printManager As PrintManager = document.PrintManager
printManager.PrintRange = PrintRange.[Select]
Dim viewSheetSetting As ViewSheetSetting = printManager.ViewSheetSetting
viewSheetSetting.CurrentViewSheetSet.Views = viewSet
viewSheetSetting.SaveAs("MyViewSet")
printManager.CombinedFile = True
printManager.SubmitPrint()
End Sub