Revit 2024 API |
Document..::..ViewPrinting Event |
Document Class See Also |
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:
2010
Syntax
C# |
---|
public event EventHandler<ViewPrintingEventArgs> ViewPrinting |
Visual Basic |
---|
Public Event ViewPrinting As EventHandler(Of ViewPrintingEventArgs) |
Visual C++ |
---|
public: event EventHandler<ViewPrintingEventArgs^>^ ViewPrinting { void add (EventHandler<ViewPrintingEventArgs^>^ value); void remove (EventHandler<ViewPrintingEventArgs^>^ value); } |
Remarks
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:
- All overloads of Autodesk.Revit.DB.Document.Export()
- Autodesk.Revit.DB.Document.Print()
- Print()()()() and similar overloads.
- SubmitPrint()()()() and similar overloads.
- Close()()()() and similar overloads.
- Save()()()() .
- SaveAs(String) and similar overloads.
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.