Model.attributeupdatedoublearray2delementmark#

Model.attributeupdatedoublearray2delementmark(collection, identifier, solver, status, behavior, row, col, value)#

Updates one element of an attribute of type 2D double array (list of hwDoubleList()).

Parameters:
  • collection (Collection) – The collection containing the entities to update thier 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.

  • 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 (double) – The new value of the 2D array element.

Example#

Update the load colletor with IDs 71 , 77 in * FREQ5_FR_ARRAY2D * dataname (identifier=7710 ) in Optistruct profile#
import hm
import hm.entities as ent

model = hm.Model()

# Finding the FREQ5_FR_ARRAY2D identifier using the hm_attributeidentifier function
_, r = model.hm_attributeidentifier(
    entity_type=ent.Loadcol, entity_id=71, attribute_name_or_id="FREQ5_FR_ARRAY2D"
)


# Setting the dataname
model.attributeupdatedoublearray2delementmark(
    collection=hm.Collection(model, ent.Loadcol, [71, 77]),
    identifier=r.id,
    solver=1,
    status=2,
    behavior=0,
    row=1,
    col=1,
    value=3.14,
)