Share

Document.Print(ViewSet, View, Boolean) Method

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


Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)

Syntax

C#

public void Print(
	ViewSet views,
	View viewTemplate,
	bool useCurrentPrintSettings
)

Parameters

views  ViewSet
The set of views which need to be printed.
viewTemplate  View
The view template which apply to the set of views.
useCurrentPrintSettings  Boolean
If true, print the view with the current print setting, otherwise with the print setting of the document of the view.

Exceptions

ExceptionCondition
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.
ArgumentNullExceptionThrown when the view set to be printed is nullptr.
ArgumentExceptionThrown when the view set contains a nullptr element.
ApplicationExceptionThrown when at least one view from the view set could not be printed.
OperationCanceledExceptionThrown when print is cancelled by event handler.

Remarks

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

See Also

Reference

Was this information helpful?