Model.attributeupdateentityidarray2delementmark#
- Model.attributeupdateentityidarray2delementmark(collection, identifier, solver, status, behavior, target_entity, row, col, value)#
Updates one element of an attribute of type 2D entity ID array (
EntityList2()).- 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.
target_entity (EntityFullType) – The type of entity to which the attribute refers.
row (int) – The row number the value to be changed resides in (first row is zero).
col (int) – The column number the value to be changed resides in (first column is zero).
value (unsigned int) – The new value of the 2D array element.
Example#
Update the load collectors in * FLLWER_LSID_ARRAY2D * dataname (identifier=10086) in Load collector with ID 24 , 75 in Optistruct profile in second row and column#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" ) loadcol_collection = hm.Collection(model, ent.Loadcol, [24, 75]) newloadcolsList = [ [ent.Loadcol(model, 22), ent.Loadcol(model, 14)], [ent.Loadcol(model, 18), ent.Loadcol(model, 41)], ] # Setting the dataname model.attributeupdateentityidarray2delementmark( collection=loadcol_collection, identifier=r.id, solver=1, status=2, behavior=0, target_entity=ent.Loadcol, row=0, col=0, value=1, )