Export Method (String, String, ViewSet, DWFXExportOptions)


Exports the current view or a selection of views in DWFX format.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public bool Export(
	string folder,
	string name,
	ViewSet views,
	DWFXExportOptions options
)
Visual Basic
Public Function Export ( _
	folder As String, _
	name As String, _
	views As ViewSet, _
	options As DWFXExportOptions _
) As Boolean
Visual C++
public:
bool Export(
	String^ folder, 
	String^ name, 
	ViewSet^ views, 
	DWFXExportOptions^ options
)

Parameters

folder
Type: System String
Output folder, into which file(s) will be exported. The folder must exist.
name
Type: System String
Either the name of a single file or a prefix for a set of files. If a null reference ( Nothing in Visual Basic) or empty, automatic naming will be used.
views
Type: Autodesk.Revit.DB ViewSet
Selection of views to be exported.
options
Type: Autodesk.Revit.DB DWFXExportOptions
Various options applicable to the DWFX format. If a null reference ( Nothing in Visual Basic) , all options will be set to their respective default values.

Return Value

Function returns true only if all specified views are exported successfully. The function returns False if exporting of any view fails, even if some views might have been exported successfully.

Remarks

All the views must be printable in order for the Export to succeed. It can be assured by checking the CanBePrinted property of each view.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown when the input views is a null reference ( Nothing in Visual Basic)
Autodesk.Revit.Exceptions ArgumentException Thrown when the input views is an empty ViewSet.
Autodesk.Revit.Exceptions InvalidOperationException Thrown when the current document is not modifiable.

See Also