IExportContext Interface

An interface that is used in custom export to process a Revit model.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public interface IExportContext

The IExportContext type exposes the following members.

Methods
 NameDescription
Public methodFinish This method is called at the very end of the export process, after all entities were processed (or after the process was cancelled).
Public methodIsCanceled This method is queried at the beginning of every element.
Public methodCode exampleOnElementBegin This method marks the beginning of an element to be exported.
Public methodOnElementEnd This method marks the end of an element being exported.
Public methodCode exampleOnFaceBegin This method marks the beginning of a Face to be exported.
Public methodOnFaceEnd This method marks the end of the current face being exported.
Public methodCode exampleOnInstanceBegin This method marks the start of processing of an instance node (e.g. a family instance).
Public methodOnInstanceEnd This method marks the end of processing of an Instance Node (e.g. a family instance).
Public methodCode exampleOnLight This method marks the beginning of export of a light which is enabled for rendering.
Public methodCode exampleOnLinkBegin This method marks the beginning of a link instance to be exported.
Public methodOnLinkEnd This method marks the end of a link instance being exported.
Public methodCode exampleOnMaterial This method marks a change of the material.
Public methodCode exampleOnPolymesh This method is called when a tessellated polymesh of a 3d face is being output.
Public methodOnRPC This method marks the beginning of export of an RPC object.
Public methodCode exampleOnViewBegin This method marks the beginning of a 3D view to be exported.
Public methodOnViewEnd This method marks the end of a 3D view being exported.
Public methodCode exampleStart This method is called at the very start of the export process, still before the first entity of the model was send out.
Top
Remarks

An instance of a class that implements this interface is passed in as a parameter of the CustomExporter constructor. The methods of the context are then called at times of exporting entities of the model.

This is a base class for two other interfaces derived from it: IPhotoRenderContext and IModelExportContext. This base class contains methods that are common to both the leaf interfaces. Although it is still possible to use classes deriving directly from this base interface (for backward compatibility), future applications should implement the new leaf interfaces only.

See Also