CustomExporterExport(View) Method |
Exports one 3D or 2D view
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void Export(
View view
)
Public Sub Export (
view As View
)
public:
void Export(
View^ view
)
member Export :
view : View -> unit
Parameters
- view View
-
An instance of the view to export
ExceptionsException | Condition |
---|
ArgumentException |
The view is not exportable, such as a template view or wrong type view, for example.
|
ArgumentNullException |
A non-optional argument was null
|
InvalidOperationException |
The instance of IExportContext is not valid.
-or-
Rendering is currently not supported in the running instance of Revit.
One reason for that to happen is that rendering and material libraries
are not currently available.
|
RemarksNote that the actual export process may differ
depending on the type of export context used. For example, when the
IModelExportContext is used,
Revit is likely to perform several rounds of traversing each view, which
may result in invoking the OnViewBegin/OnViewEnd method multiple times
for every one view. It is because Revit draws objects in several layers
(model layer, annotation layer, etc.) and will traverse each layer individually.
In the most common scenario the user will receive two invocations of OnViewBegin/OnViewEnd:
In the first round, all model entities will be received, while in the second round
all text annotation elements will be received, if any present in the given view.
See Also