Prints a set of views with default view template and default print settings.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public void Print(
	ViewSet views,
	bool useCurrentPrintSettings
)
Visual Basic
Public Sub Print ( _
	views As ViewSet, _
	useCurrentPrintSettings As Boolean _
)
Visual C++
public:
void Print(
	ViewSet^ views, 
	bool useCurrentPrintSettings
)

Parameters

views
Type: Autodesk.Revit.DB..::..ViewSet
The set of views which need to be printed.
useCurrentPrintSettings
Type: System..::..Boolean
If true, print the view with the current print setting, otherwise with the print setting of the document of the view.

Remarks

If one view in the set can not be printed successfully then an exception will be thrown.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..InvalidOperationExceptionThrown when printing is not allowed in the current application mode. Or when at least one view from the view set is not a printable view.
Autodesk.Revit.Exceptions..::..ArgumentNullExceptionThrown when the view set to be printed is nullNothingnullptra null reference (Nothing in Visual Basic).
Autodesk.Revit.Exceptions..::..ArgumentExceptionThrown when the view set contains a nullNothingnullptra null reference (Nothing in Visual Basic) element.
Autodesk.Revit.Exceptions..::..ApplicationExceptionThrown when at least one view from the view set could not be printed.
Autodesk.Revit.Exceptions..::..OperationCanceledExceptionThrown when print is cancelled by event handler.

See Also