Model.hm_cardassignedtoentity#

Model.hm_cardassignedtoentity(entities)#

Returns True if a card can be assigned to the entities on the collection for the current template, False otherwise.

Parameters:

entities (Collection) – The collection containing the entities to query.

Returns:

Example#

Query components with IDs 100 and 101#
import hm
import hm.entities as ent

model = hm.Model()

component_collection = hm.Collection(model, ent.Component, [100, 101])

_, result = model.hm_cardassignedtoentity(entities=component_collection)

print("Can the card be assigned:", result.canBeAssigned)