*writefile

Saves a binary HyperMesh database.

Syntax

*writefile filename do_not_write_facets

Type

HyperMesh Tcl Modify Command

Description

This command saves a binary HyperMesh database.

Inputs

filename
The full path and filename of the database to save. If this file already exists, HyperMesh will prompt to overwrite the file.
When running in batch mode, *answer (for .cmf files) or hm_answernext (for Tcl scripts) must be used to specify a yes/no answer to this command when the file already exists.
do_not_write_facets
0 - Geometry facets are written to the file, leading to a larger file but faster load time.
1 - Geometry facets are written to the file, leading to a larger file but faster load time.
2 - Geometry facets are not written to the file, leading to a smaller file but longer load time.

Examples

To save the model to a file named mymodel.hm in the current working directory:

*writefile mymodel.hm 0

To save the model to a file named C:/mymodel.hm:

*writefile C:/mymodel.hm 0

To overwrite an existing file named C:/mymodel.hm:

hm_answernext yes
*writefile C:/mymodel.hm 0

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

2019 - The behavior of the do_not_write_facets option has changed. Value 1 previously was used to not write facets, but now is the same as value 0. A new value 2 is now used to not write facets.