Model.geomexport#
- Model.geomexport(translator_type, output_file_name, options)#
Exports geometry to various CAD formats.
- Parameters:
translator_type (hwString) – The translator to use for export. Valid values are: iges_altair, jt_jtopen, parasolid_parasolid and step_ct.
output_file_name (hwString) – The name of the file to output.
options (hwStringList) –
Defines the export behavior. The actual options usable depend on the translator. The allowed options correspond to those supported in the .ini files, in terms of both name and possible values. All options specified in the command line and .ini files are fully synchronized, i.e. every option is available in both the command line and the .ini file. The full list of options and values can be found in the CAD Export Options documentation. Options passed via the command line prevail over options mentioned in the .ini file; options in the .ini file are effective only when the corresponding option is not used in the command line.
Options mentioned neither in the command line nor in the .ini file assume values taken from a default option value set internally.
Case insensitivity is supported for option values, but not option names. For example:
[...,"OptimizeforCAD=Off"],[...,"OptimizeforCAD=OFF"],[...,"OptimizeforCAD=off"]will all provide the same result. The order of these options does not matter.
Example#
Export the displayed geometry in Parasolid v27.0 format , to the file “ C:/temp / sample.x_t “ , use various options#import hm import hm.entities as ent model = hm.Model() model.geomexport( translator_type="parasolid_parasolid", input_file_name="C:/temp/sample.x_t", options=[ "Version=27.0", "Export=Displayed", "Units=Meters", "GeometryMode=Standard", "TopologyMode=Solid/Shell", "AssemblyMode=Hierarchy", "WriteNameFrom=Component", "OptimizeforCAD=Off", ], )