IModelExportContext
An interface that is used in custom export to export 3D views of a Revit model.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public interface IModelExportContext : IExportContextBase
The IModelExportContext type exposes the following members.
Methods
Name
Description
Public Method
OnCurve
This method is called when a Curve is being output.
(Inherited from IExportContextBase)
Public Method
OnLineSegment
This method is called after unhandled curve was tessellated to line segments and sent to the output.
Note for 2D export: if the export is performed for the view in non-Wireframe display style, then
- this method is called outside of view, instance and link begin/end calls but still between OnElementBegin2D/OnElementEnd2D calls
- this method is never called for annotation elements, i.e. their geometry should be processed in methods OnCurve and OnPolyline
(Inherited from IExportContextBase)
Public Method
OnPoint
This method is called when a Point is being output.
Public Method
OnPolyline
This method is called when a Polyline is being output.
(Inherited from IExportContextBase)
Public Method
OnPolylineSegments
This method is called after unhandled curve was tessellated to polyline segments and sent to the output.
Note for 2D export: if the export is performed for the view in non-Wireframe display style, then
- this method is called outside of view, instance and link begin/end calls but still between OnElementBegin2D/OnElementEnd2D calls
- this method is never called for annotation elements, i.e. their geometry should be processed in methods OnCurve and OnPolyline
(Inherited from IExportContextBase)
Public Method
OnText
This method is called when a text annotation object is being output.
(Inherited from IExportContextBase)
Remarks
An instance of a class that implements this interface is passed in as a parameter of the CustomExporter constructor. The interface methods are then called at times of drawing entities that are currently visible in the view being exported.
With this type of export context used to perform a custom export, Revit will traverse the model and output the model’s geometry as if in the process of regular displaying or exporting a 3D View. It means that any geometry which is visible in an open view (taking any current visibility setting applicable to the view) will be processed and output.