Model.attributeupdate_entityidarray2d#
- Model.attributeupdate_entityidarray2d(entity, identifier, solver, status, behavior, target_entity)#
Updates an attribute that is a 2D array (list) of entity lists (
EntityList2()).- Parameters:
entity (Entity) – The object describing the entity 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.
target_entity (EntityList2) – The list of entity lists to which the attribute refers.
Example#
Update the load collectors in * FLLWER_LSID_ARRAY2D * dataname (identifier=10086) in Load collector with ID 24 in Optistruct profile#import hm import hm.entities as ent model = hm.Model() # Finding the FLLWER_LSID_ARRAY2D identifier using the hm_attributeidentifier function _, r = model.hm_attributeidentifier( entity_type=ent.Loadcol, entity_id=24, attribute_name_or_id="FLLWER_LSID_ARRAY2D" ) newloadcolsList = [ [ent.Loadcol(model, 22), ent.Loadcol(model, 14)], [ent.Loadcol(model, 18), ent.Loadcol(model, 41)], ] # Setting the dataname model.attributeupdate_entityidarray2d( entity=ent.Loadcol(model, 1), identifier=r.id, solver=1, status=2, behavior=0, target_entity=newloadcolsList, )