Model.convertbeamsection#

Model.convertbeamsection(collection, source_solver_id, target_solver_id)#

Updates the target solver ID for beamsections.

Parameters:
  • collection (Collection) – The collection containing the beamsections entities to update.

  • source_solver_id (int) – The ID of the source solver for the specified beamsections. This can be queried using hm_getsolver().

  • target_solver_id (int) – The ID of the target solver for the specified beamsections. This can be queried using hm_getsolver().

Example#

Convert beamsections with IDs 1-5 from solver ID 2 (Abaqus) to solver ID 1 (OptiStruct)#
import hm
import hm.entities as ent

model = hm.Model()

model.convertbeamsection(
    collection=hm.Collection(model, ent.Beamsection, list(range(1, 6))),
    source_solver_id=2,
    target_solver_id=1,
)