Model.attributeupdatesolverid#
- Model.attributeupdatesolverid(entity, identifier, solver, status, behavior, solver_id, pool_id)#
Solver IDs and ID pools let HyperMesh maintain the organization of models for solvers whose data model does not correspond well to the natural layout. The IDs themselves are stored on a special kind of attribute attached to the entity.
This function is used to update the solver ID attribute for a specified entity.
The need to use this function is very rare and is provided for situations that understand the ID pool organization of a particular solver.
- 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.
solver_id (unsigned int) – The solver ID to record to the attribute.
pool_id (int) – The ID of the solver ID pool to which the solver ID belongs.
Example#
Update the solver ID of in * PSHELL_T * dataname (identifier=95) in property with ID 1 to record a solver ID of 1 in pool number 3#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.attributeupdatesolverid( entity=ent.Property(model, 1), identifier=r.id, solver=1, status=2, behavior=0, solver_id=1, pool_id=3, )