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. Then export them by entering
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.
In the above commands the file extension in the <filename> string determines the file format, which can be of any of the following:
.x_b, .xmt_bin
.x_t, .xmt_txt
.igs, .iges
.step, .stp
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 31.0.
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