Model.attributeupdatedouble#

Model.attributeupdatedouble(entity, identifier, solver, status, behavior, value)#

Updates an attribute of type double.

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.

  • value (double) – The value of the attribute.

Example#

Update the property with ID 1 in * PSHELL_T * dataname (identifier=95 ) in Optistruct profile#
import hm
import hm.entities as ent

model = hm.Model()

# Finding the PSHELL_T identifier using the hm_attributeidentifier function
_, r = model.hm_attributeidentifier(
    entity_type=ent.Property, entity_id=1, attribute_name_or_id="PSHELL_T"
)

# Setting the dataname
model.attributeupdatedouble(
    entity=ent.Property(model, 1),
    identifier=r.id,
    solver=1,
    status=2,
    behavior=0,
    value=2.0,
)