PrintManager Class


The PrintManager object is used to configure the global print settings.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)

Syntax

C#
public class PrintManager : APIObject
Visual Basic
Public Class PrintManager _
	Inherits APIObject
Visual C++
public ref class PrintManager : public APIObject

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

Inheritance Hierarchy

System Object
Autodesk.Revit.DB APIObject
Autodesk.Revit.DB PrintManager

See Also