Model.attributeupdateentitymark#
- Model.attributeupdateentitymark(collection, identifier, solver, status, behavior, targetentity)#
Updates an attribute of type entity on a set of entities.
- Parameters:
collection (Collection) – The collection containing the entities to update their attribute.
identifier (int) – The identifier of the attribute.
solver (int) – The solver number of the attribute.
status (int) – The status of the attribute.
behavior (int) – The behavior of the attribute.
targetentity (Entity) – The object describing the entity which will be set to the attribute.
Example#
Update the load collectors with IDs 11 , 79 in * CDSMETH_OSET * dataname (identifier=517) in Optistruct profile by set the set with ID 6#import hm import hm.entities as ent model = hm.Model() # Finding the CDSMETH_OSET identifier using the hm_attributeidentifier function _, r = model.hm_attributeidentifier( entity_type=ent.Loadcol, entity_id=11, attribute_name_or_id="CDSMETH_OSET" ) # Setting the dataname model.attributeupdateentitymark( collection=hm.Collection(model,ent.Loadcol,[11, 79]), identifier=r.id, solver=1, status=2, behavior=0, targetentity=ent.Set(model, 6), )