Model.attributeupdateintarraymark#

Model.attributeupdateintarraymark(collection, identifier, solver, status, behavior, data)#

Updates an attribute of type integer array (hwIntList()) 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 (hwIntList) – The int array.

Example#

Update the load collectors with IDs 74 , 80 in * IMPERF_NRES * dataname (identifier=11345 ) in Optistruct profile by set attribute to [ 4 , 5 , 10 ]#
import hm
import hm.entities as ent

model = hm.Model()

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

# Setting the dataname
model.attributeupdateintarraymark(
    collection=hm.Collection(model,ent.Loadcol,[74, 80]),
    identifier=r.id,
    solver=1,
    status=2,
    behavior=0,
    data=[4, 5, 10],
)