IExport |
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

The IExportContext2D type exposes the following members.

Name | Description | |
---|---|---|
![]() | OnCurve | This method is called when a Curve is being output. (Inherited from IExportContextBase ) |
![]() | OnElementBegin2D | This method marks the beginning of an element to be exported. |
![]() | OnElementEnd2D | This method marks the end of an element being exported. |
![]() | OnFaceEdge2D | This method is called when a Face edge is being output. |
![]() | OnFaceSilhouette2D | This method is called when a Face silhouette is being output. |
![]() | 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
(Inherited from IExportContextBase ) |
![]() | OnPolyline | This method is called when a Polyline is being output. (Inherited from IExportContextBase ) |
![]() | 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
(Inherited from IExportContextBase ) |
![]() | OnText | This method is called when a text annotation object is being output. (Inherited from IExportContextBase ) |

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 2D 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. Optionally, annotation objects are also output.
Note 1. Curves passed to calls OnFaceEdge2D(FaceEdgeNode) and OnFaceSilhouette2D(FaceSilhouetteNode) may be partially duplicating each other.
Note 2. If element E is a FamilyInstance and it contains an imported instance then:
- between the calls to OnElementBegin2D/OnElementEnd2D for element E there will be calls to OnInstanceBegin/OnInstanceEnd with the "node" argument pointing to the element with its symbol being of category BuiltInCategories.OST_ImportObjectStyles
- all geometry exported for the element E has to be additionally subject to the transform T=E.GetTotalTransform()
