Export, ExportFinal
Using the CAD Import Module, Design Module, or a LiveLink product for CAD software, export selected geometry objects or the finalized geometry to a 3D CAD format, such as ACIS, Parasolid, STEP, and IGES.
To export selected geometry objects to a file, first select the objects to export using
model.component(<ctag>).geom(<tag>).export().selection().set(<objnames>);
where <objnames> is a string array of object names.
Set the file format using
model.component(<ctag>).geom(<tag>).export().setType(<format>);
where <format> determines the file format. See TableĀ 3-21 for valid type value names available with the CAD Import Module, Design Module, or a LiveLink product for CAD software.
.x_b, .xmt_bin
.x_t, .xmt_txt
.igs, .iges
.step, .stp
Check which file format is set for the export using
String formatType = model.component(<ctag>).geom(<tag>).export().getType();
To export the file enter
model.component(<ctag>).geom(<tag>).export(<filename>);
To export the finalized geometry to a file, enter
model.component(<ctag>).geom(<tag>).exportFinal(<filename>);
where <filename> is a string.
Exporting to an ACIS File
When exporting to an ACIS file you can set the ACIS file format version using
model.component(<ctag>).geom(<tag>).export().setAcisVersion(<version>);
where <version> is a string 4.0, 7.0, or 2016 1.0. Default is 2016 1.0.
Exporting to a Parasolid File
The Parasolid text or binary file generated by the export is of version 34.
When exporting to a Parasolid format, a unit conversion can optionally be performed during export. Use the following method to select the export length unit:
model.component(<ctag>).geom(<tag>).export().setLengthUnit(<unit>);
where <unit> is either fromgeom (default) to disable unit conversion or a COMSOL Multiphysics length unit, such as m for meters or in for inches. To get the current value of the export length unit type:
model.component(<ctag>).geom(<tag>).export().getLengthUnit();
To decide how the non-manifold objects are exported use the following method:
model.component(<ctag>).geom(<tag>).export().setSplitInManifold(<value>);
where <value> is either true (default) to split the objects into manifold objects during the export, or false to export the unmodified objects.
Exporting to an IGES File
When exporting to the IGES format, a unit conversion can optionally be performed during export. Use the following method to select the export length unit:
model.component(<ctag>).geom(<tag>).export().setLengthUnitIGES(<unit>);
where <unit> is either fromgeom (default) to disable unit conversion or a supported length unit: uin, um, mil, mm, cm, in, ft, m, km, mi.To get the current value of the export length unit type:
model.component(<ctag>).geom(<tag>).export().getLengthUnitIGES();
Exporting to a STEP File
When exporting to the STEP format, a unit conversion can optionally be performed during export. Use the following method to select the export length unit:
model.component(<ctag>).geom(<tag>).export().setLengthUnitSTEP(<unit>);
where <unit> is either fromgeom (default) to disable unit conversion or a supported length unit: nm, uin, um, mil, mm, cm, in, dm, ft, m, km, mi. To get the current value of the export length unit type:
model.component(<ctag>).geom(<tag>).export().getLengthUnitSTEP();
See Also
Import 3D CAD