Duplicate steel connections using API

Hello,

Is there a way to duplicate steel connections or add components using the API II?

The following code copies most settings, except for the bearing conditions of the rods, but the actual components of a connection are not transferred.

Best regards

from dlubal.api import rfem

source_joint_index: int = 1
target_joint_index: int = 2


with rfem.Application() as rfem_app:

    source_joint: rfem.steel_joints_objects.SteelJoint = rfem_app.get_object(
        obj=rfem.steel_joints_objects.SteelJoint(
            no=source_joint_index,
        )
    )

    target_joint: rfem.steel_joints_objects.SteelJoint = (
        rfem.steel_joints_objects.SteelJoint()
    )

    target_joint.CopyFrom(source_joint)

    target_joint.no = target_joint_index

    target_joint.name = "target_joint"

    rfem_app.create_object(target_joint)

20260502_Anfrage_Anschluss_duplizieren.rf6 (1.1 MB)

Hi Benedikt,

The components of the steel connections use a special identification format that consists of a unique database GUID and an object tag (e.g., "GUID|Flange1").

The problem: These IDs are bound:

  • If you copy the ID, the server refuses creation due to an identity conflict with the original object.
  • If you delete the ID to generate a new one, the component loses its internal reference to the rod geometry, as the API currently does not provide a mechanism to automatically reassign these "floating" components to the new node.

For safety, the server therefore discards the components instead of creating a potentially unstable object.

At the moment, you could copy the steel connection but would then have to recreate the components.

Best regards,
Rebecca Göbel