Model.compactsubmodelids#

Model.compactsubmodelids(submodel_id, id, entity_type, pool_id)#

Renumbers ID ranges starting from the minimum allowed ID.

Parameters:
  • submodel_id (hwString) – Submodel type to compact the IDs for. Valid values are includes and includefiles.

  • id (unsigned int) – The ID of the submodel.

  • entity_type (hwString) –

    The type of entity to compact the IDs for.

    0 - all entity types in the submodel are considered.

  • pool_id (unsigned int) – The optional ID of the solver pool.

Examples#

Compact component IDs in include file 1#
import hm
import hm.entities as ent

model = hm.Model()

model.compactsubmodelids(submodel_id="includes", id=1, entity_type="comps", pool_id=0)
Compact all entity type IDs in include file 1#
import hm
import hm.entities as ent

model = hm.Model()

model.compactsubmodelids(submodel_id="includes", id=1, entity_type="0", pool_id=0)