Model.hm_me_moduleget#

Model.hm_me_moduleget(entity)#

Returns the part ID an entity belongs to.

Parameters:

entity (Entity) – The type of part entity to query. Valid entity values are components.

Returns:

Example#

Get the module ID that component with ID 10 belongs to#
import hm
import hm.entities as ent

model = hm.Model()

_,result = model.hm_me_moduleget(entity=ent.Component(model, 10))

print("parentPart", result.parentPart)