Model.updateoffset#

Model.updateoffset(type, include_id, shortname, entity_type, pool_id, offset)#

Updates the definition of the offset.

Parameters:
  • type (hwString) – Must be set to includefiles.

  • include_id (unsigned int) – The include file ID, if shortname is not used.

  • shortname (hwString) – The shortname of the include file, if include_id is not used.

  • entity_type (hwString) – The type of entity to update. Set to 0 to update all entities under the include file.

  • pool_id (unsigned int) – The pool ID for the entities to update. Set to 0 for all of pools.

  • offset (unsigned int) – The offset value to assign.

Example#

Assigning offset 1000 to all entities in include file 1#
import hm
import hm.entities as ent

model = hm.Model()

model.updateoffset(
    type="includefiles",
    include_id=1,
    shortname="",
    entity_type="0",
    pool_id=0,
    offset=1000,
)