Export Method (String, String, OBJExportOptions)


Exports a view specified in the export options to the OBJ format.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2023

Syntax

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

Parameters

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

Return Value

True if successful, otherwise False.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException NullOrEmpty -or- Contains invalid characters. -or- The provided options do not specify a printable 3D view.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsForbiddenForDynamicUpdateException This method may not be called during dynamic update.
Autodesk.Revit.ExceptionsInvalidOperationException Export is temporarily disabled. -or- Exporting is not allowed in the current application mode.
Autodesk.Revit.ExceptionsInvalidPathArgumentException The folder does not exist.
Autodesk.Revit.ExceptionsOptionalFunctionalityNotAvailableException The ShapeExporter functionality is not available in the installed Revit, or the Material Library is missing.

See Also