Exports the document to the STL format.

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

Syntax

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

Parameters

folder
Type: System..::..String
Output folder into which the file will be exported. The folder must exist.
name
Type: System..::..String
Indicates the name of the STL file to export. If it doesn't end with ".stl", this extension will be added automatically. The name cannot contain any of the following characters: \/:*?"<>|. Empty name is not acceptable.
options
Type: Autodesk.Revit.DB..::..STLExportOptions
Various options applicable to the STL format.

Return Value

True if successful, otherwise False.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentException NullOrEmpty -or- Contains invalid characters -or- The viewId in provided export options is not an id of a 3D view.
Autodesk.Revit.Exceptions..::..ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions..::..ForbiddenForDynamicUpdateException This method may not be called during dynamic update.
Autodesk.Revit.Exceptions..::..InvalidOperationException Export is temporarily disabled. -or- Exporting is not allowed in the current application mode.
Autodesk.Revit.Exceptions..::..InvalidPathArgumentException The folder does not exist.
Autodesk.Revit.Exceptions..::..OptionalFunctionalityNotAvailableException The ShapeExporter functionality is not available in the installed Revit.

See Also