create_object_list#

dlubal.api.rfem.Application.create_object_list(self, objs: list, model_id: ModelId | None = None, return_object_id=False)#

Creates a list of objects in the model.

Parameters:
  • objs (list[obj]) – A list of objects to be created. Refer to the dlubal.api.rfem for available objects.

  • model_id (ModelId | None) – Unique identifier of the model.

  • return_object_id (bool) – Specifies whether to return the list of object IDs.

Returns:

List of IDs of the created objects if return_object_id is True, otherwise None.

Return type:

ObjectIdList (ObjectIdList | None)

# Create list of objects
lst = [
    rfem.structure_core.Material(no=1, name="S450 | EN 1993-1-1:2005-05"),

    rfem.structure_core.Section(no=1, material=1, name="IPN 300"),

    rfem.structure_core.Thickness(no=1, material=1, uniform_thickness=0.008, assigned_to_surfaces=[1,6,7,8,9]),

    rfem.structure_core.Node(no=1, coordinate_1=0.0, coordinate_2=0.0, coordinate_3=0.0),
    rfem.structure_core.Node(no=2, coordinate_1=3.0, coordinate_2=0.0, coordinate_3=0.0),
    rfem.structure_core.Node(no=3, coordinate_1=3.0, coordinate_2=3.0, coordinate_3=0.0),
    rfem.structure_core.Node(no=4, coordinate_1=0.0, coordinate_2=3.0, coordinate_3=0.0),
    rfem.structure_core.Node(no=5, coordinate_1=0.0, coordinate_2=0.0, coordinate_3=-3.0),

    rfem.structure_core.Line(no=1, definition_nodes=[1,5]),

    rfem.types_for_nodes.NodalSupport(no=1, nodes=[1,2,3,4], spring_x=700000, spring_y=800000, spring_z=5000000),
]

# Function will create all the objects specified in the list
rfem_app.create_object_list(lst)