Model.removeinclude#

Model.removeinclude(id=0, shortname='', removecontents=0)#

Deletes the include file from the database, optionally removing all of its contents as well.

Parameters:
  • id (unsigned int) – Use an id of 0 to have HyperMesh to use the shortname to select the file.

  • shortname (hwString) – The shortname to use to select the file. This can be left empty if the id is specified.

  • removecontents (int) – If nonzero, and either the id or the shortname selects a single file, then all of the contents of that include file will be deleted from the database.

Example#

Remove the include file “ mat1.dyn “ from the database , and delete its contents as well#
import hm
import hm.entities as ent

model = hm.Model()

model.removeinclude(id=0, shortname="mat1.dyn", removecontents=1)

Note

If both id and shortname are empty, this function removes all include files from the database (but does not delete the files’ contents). If the contents are not deleted, they move to the file’s parent include file.