Model.hm_entityrecorder_switch#

Model.hm_entityrecorder_switch(entity_type, option)#

Records the IDs of the entities created while the recorder is enabled. This is useful for finding the IDs of multiple entities created during various processes.

The recorder must be turned on to enable recording. It is also important to make sure to turn off the recorder. See the option argument below.

Parameters:
  • entity_type (EntityFullType) – The type of entity to record.

  • option (hwString) –

    on - Turn on the entity recorder.

    off - Turn off the entity recorder.

Returns:

Example#

Record the created components and get the number and list of recorded IDs#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_entityrecorder(entity_type=ent.Component, option="on")