ExportManager.createSTLExportOptions Method

Parent Object: ExportManager
Defined in namespace "adsk::fusion" and the header file is <Fusion/Fusion/ExportManager.h>

Description

Creates an STLExportOptions object that's used to export a design in STL format. Creation of the STLExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export.

Syntax

"exportManager_var" is a variable referencing an ExportManager object.

# Uses no optional arguments.
returnValue = exportManager_var.createSTLExportOptions(geometry)

# Uses optional arguments.
returnValue = exportManager_var.createSTLExportOptions(geometry, filename)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createSTLExportOptions(geometry);

// Uses optional arguments.
returnValue = exportManager_var->createSTLExportOptions(geometry, filename);
"exportManager_var" is a variable referencing an ExportManager object.

// Uses no optional arguments.
returnValue = exportManager_var.createSTLExportOptions(geometry);

// Uses Optional arguments.
returnValue = exportManager_var.createSTLExportOptions(geometry, filename);

Return Value

Type Description
STLExportOptions The created createSTLExportOptions object or null if the creation failed.

Parameters

Name Type Description
geometry Base The geometry to export. This can be a BRepBody, Occurrence, or Component object.
filename string The filename of the STL file to be created. This is optional and can be left out if the mesh will be opened in a mesh editor.

This is an optional argument whose default value is "".

Samples

Name Description
Export to other formats API Sample

Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D, and STL formats.

Before running: Have a design open in the DESIGN workspace. Run the script from Scripts and Add-Ins. It writes translated files to a temporary directory and shows that path in a message box.

STLExport API Sample

Demonstrates how to export f3d to STL format.

Before running: Run in the DESIGN workspace from Scripts and Add-Ins (Python, C++, or TypeScript), unless the script states otherwise.

The script exports the active design to external formats.

Version

Introduced in version January 2015