Model.writefile#
- Model.writefile(filename, do_not_write_facets)#
Saves a binary HyperMesh database.
- Parameters:
filename (hwString) – The full path and filename of the database to save. If this file already exists, HyperMesh prompts to overwrite the file. When running in batch mode, run
Model.hm_answernext(). Must be used to specify a yes/no answer to this function when the file already exists.do_not_write_facets (int) –
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#
Save the model to a file named “ mymodel.hm “ in the current working directory#import hm import hm.entities as ent model = hm.Model() model.writefile(filename="mymodel.hm", do_not_write_facets=0)
Save the model to a file named “ C:/mymodel.hm “#import hm import hm.entities as ent model = hm.Model() model.writefile(filename="C:/mymodel.hm", do_not_write_facets=0)
Overwrite an exist file named “ C:/mymodel.hm “#import hm import hm.entities as ent model = hm.Model() model.hm_answernext(answer="yes") model.writefile(filename="C:/mymodel.hm", do_not_write_facets=0)