Model.attributeupdateentityidarraymark#
- Model.attributeupdateentityidarraymark(collection, identifier, solver, status, behavior, data)#
Updates an attribute, which is an array of entity IDs, on a set of entities.
- Parameters:
collection (Collection) – The collection containing the entities that owns the 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.
data (EntityList) – The list of entities to which the attribute refers.
Example#
Update the load collectors in * MOTNJG_JID * dataname (identifier=10807) in Load collector with ID 73 , 76 in Optistruct profile#import hm import hm.entities as ent model = hm.Model() # Finding the MOTNJG_JID identifier using the hm_attributeidentifier function _, r = model.hm_attributeidentifier( entity_type=ent.Loadcol, entity_id=73, attribute_name_or_id="MOTNJG_JID" ) loadcol_collection = hm.Collection(model, ent.Loadcol, [73, 76]) newElementList = [ent.Element(model, 85), ent.Element(model, 19)] # Setting the dataname model.attributeupdateentityidarraymark( collection=loadcol_collection, identifier=r.id, solver=1, status=2, behavior=0, data=newElementList, )