Model.reorderinclude#

Model.reorderinclude(id_to_move, id_of, predecessor)#

Changes the order of the include files in a model.

Parameters:
  • id_to_move (unsigned int) – The ID of the include file that should move.

  • id_of (unsigned int) – The ID of an include file after which the id_to_move include file should be placed in the database.

  • predecessor (int) –

    Determines whether the predecessor file also becomes the parent of the include file that moves:

    0 - The predecessor file and moved include file are at the same level in hierarchy.

    1 - The predecessor file becomes the parent.

Note

HyperMesh writes out include files in ID-order. This means that reordering include files is equivalent to renumbering some include files, with the added possibility of a change in the hierarchy.

Example#

Place the include file with ID 1 after the one with ID 3 at the same level in hierarchy#
import hm
import hm.entities as ent

model = hm.Model()

model.reorderinclude(id_to_move=1, id_of=3, predecessor=0)