PrintManager
The PrintManager object is used to configure the global print settings.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.PrintManager
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class PrintManager : APIObject
The PrintManager type exposes the following members.
Properties
Name
Description
Public Property
Collate
Indicates whether to collate of the current print.
Public Property
CombinedFile
Indicates whether to combine multiple selected views/sheets into a single file.
Public Property
CopyNumber
The copy number.
Public Property
Code Example
IsReadOnly
Identifies if the object is read-only or modifiable.
(Inherited from APIObject)
Public Property
IsVirtual
The virtual type in Autodesk Revit.
Public Property
PaperSizes
Get all print sizes of current printer.
Public Property
PaperSources
Get all print sources of current printer.
Public Property
PrinterName
The name of the current printer.
Public Property
PrintOrderReverse
Indicates whether to reverse the print order of the current print.
Public Property
PrintRange
The print range.
Public Property
PrintSetup
The PrintSetup which manages the print settings of current document.
Public Property
PrintToFile
Indicates whether to print to file.
Public Property
PrintToFileName
The file name when printing to file.
Public Property
ViewSheetSetting
The ViewSheetSetting which manages the view/sheet set information of current document, and you can change the default view/sheet set for current project.
Methods
Name
Description
Public Method
Apply
Apply the local print settings to global for all documents.
Public Method
Dispose
Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
SelectNewPrintDriver
Select a new printer.
Public Method
SubmitPrint.
Print the views and sheets defined in the current local PrintManager settings.
Public Method
SubmitPrint(View)
Print a view with the current PrintManager settings.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
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.
Example
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();}