ViewPrinting Event

Subscribe to the ViewPrinting event to be notified when Revit is just about to print a view of the document.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2010


public event EventHandler<ViewPrintingEventArgs> ViewPrinting
Visual Basic
Public Event ViewPrinting As EventHandler(Of ViewPrintingEventArgs)
Visual C++
 event EventHandler<ViewPrintingEventArgs^>^ ViewPrinting {
	void add (EventHandler<ViewPrintingEventArgs^>^ value);
	void remove (EventHandler<ViewPrintingEventArgs^>^ value);


This event is raised when Revit is just about to print a view of the document. If multiple views are combined to a single file, this event will be raised only once.

Handlers of this event are permitted to make modifications to any document (including the active document), except for documents that are currently in read-only mode.

Event is not cancellable. The 'Cancellable' property of event's argument is always False.

The following API functions are not available for the current document during this event:

Exception InvalidOperationException will be thrown if any of the above methods is called during this event.

Another event ViewPrinted will be raised immediately after view printing is finished.

See Also