Model.hm_cardassignedtoentity#
- Model.hm_cardassignedtoentity(entities)#
Returns
Trueif a card can be assigned to the entities on the collection for the current template,Falseotherwise.- Parameters:
entities (Collection) – The collection containing the entities to query.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:canBeAssigned (bool)
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)