ViewsExportingByContext Event


Subscribe to the ViewsExportingByContext event to be notified when Revit is just about to export one or more views of the document via an export context by CustomExporter.

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2021

Syntax

C#
public event EventHandler<ViewsExportingByContextEventArgs> ViewsExportingByContext
Visual Basic
Public Event ViewsExportingByContext As EventHandler(Of ViewsExportingByContextEventArgs)
Visual C++
public:
 event EventHandler<ViewsExportingByContextEventArgs^>^ ViewsExportingByContext {
	void add (EventHandler<ViewsExportingByContextEventArgs^>^ value);
	void remove (EventHandler<ViewsExportingByContextEventArgs^>^ value);
}

Remarks

This event is raised when Revit is just about to export views of the document via an export context by CustomExporter.

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 cancellable. To cancel it, call the 'Cancel()' method in event's argument to True.

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 ViewsExportedByContext will be raised immediately after view exporting by CustomExporter is finished.

See Also