Model.attributeupdatedoublearray#

Model.attributeupdatedoublearray(entity, identifier, solver, status, behavior, data)#

Updates an attribute of type double array (hwDoubleList()).

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.

  • data (hwDoubleList) – The list of doubles of the attribute.

Example#

Update the load colletor with ID 73 in * MOTNJG_REALVAL * dataname (identifier=10810 ) in Optistruct profile#
import hm
import hm.entities as ent

model = hm.Model()

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

# Setting the dataname
model.attributeupdatedoublearray(
    entity=ent.Loadcol(model, 73),
    identifier=r.id,
    solver=1,
    status=2,
    behavior=0,
    data=[4.0, 5.6],
)