Concrete Design ULS Configuration Update

RFEM 6 Python API – problem updating ULS configuration without breaking radio buttons

Environment
RFEM 6.12.8
Python gRPC API
EN 1992-1-1

I am trying to update a single setting in an existing concrete design ULS configuration through the API. The aim is simply to switch off:

Minimum shear reinforcement acc. to 9.3.2 and 9.6.4

while keeping all other ULS settings exactly as they are.

My first attempt was:

uls = rfem_app.get_object(
    rfem.concrete_design_objects.ConcreteDesignUlsConfiguration(no=13)
)

tree = uls.settings_surface_ec2

common.set_tree_value(
    tree=tree,
    path=["limits_of_reinforcement_areas", "minimum_shear_reinforcement"],
    value=False,
)

uls.ClearField("standard_parameters")
uls.ClearField("standard_parameters_tree")

rfem_app.update_object(uls)

After reloading the ULS configuration, the minimum shear reinforcement setting is correctly set to False, but it modified the other settings. For instance, under Surface required shear reinforcement – shear capacity, Use required longitudinal reinforcement is now False (but I want to keep it as True.

To investigate further I wrote a helper that updates both settings_surface_ec2 and standard_parameters_tree in the same pass, applies all updates together, clears the required fields immediately before update_object, and confirms the final values after reloading the object (to set min shear req to False, and use required longitudinal reo to True).

The helper:

def _set_surface_tree_values(
    rfem_app,
    *,
    uls_config_no: int,
    updates: List[Dict[str, Any]],
    action_desc: str,
    log_tree: bool = False,
) -> None:
    uls = rfem_app.get_object(
        rfem.concrete_design_objects.ConcreteDesignUlsConfiguration(no=uls_config_no)
    )

    surf_tree = uls.settings_surface_ec2
    standard_tree = getattr(uls, "standard_parameters_tree", None)

    trees_to_update = [("settings_surface_ec2", surf_tree)]
    if standard_tree is not None:
        trees_to_update.append(("standard_parameters_tree", standard_tree))

    for update in updates:
        path = update["path"]
        value = update["value"]
        for tree_label, tree in trees_to_update:
            common.set_tree_value(tree=tree, path=path, value=value)

    try:
        uls.ClearField("standard_parameters")
    except:
        pass
    try:
        uls.ClearField("standard_parameters_tree")
    except:
        pass

    rfem_app.update_object(uls)

    refreshed = rfem_app.get_object(
        rfem.concrete_design_objects.ConcreteDesignUlsConfiguration(no=uls_config_no)
    )

   

I called it like this:

_set_surface_tree_values(
    rfem_app,
    uls_config_no=10,
    action_desc="Disable min shear + preserve selection",
    updates=[
        {
            "path": ["limits_of_reinforcement_areas", "minimum_shear_reinforcement"],
            "value": False,
        },
        {
            "path": [
                "surface_required_shear_reinforcement_shear_capacity",
                "surface_longitudinal_reinforcement_use_provided",
            ],
            "value": False,
        },
        {
            "path": [
                "surface_required_shear_reinforcement_shear_capacity",
                "surface_longitudinal_reinforcement_use_required",
            ],
            "value": True,
        },
    ],
)

Even when all three updates are applied at once and written to both trees, the same behaviour occurs. The checkbox (min shear req) updates correctly, but the radio buttons (surface_required_shear_reinforcement_shear_capacity) revert to False/False immediately after update_object.

It appears that clearing standard_parameters and standard_parameters_tree is required to avoid the gRPC error, but clearing them seems to cause RFEM to regenerate those fields and discard the previous radio-button state?

My questions:

  1. Is there any supported way to turn off minimum shear reinforcement in a ULS configuration without altering the shear-capacity radio-button selection?

  2. What am I doing wrong when I try to set both options above?

If anyone has an example of updating a ULS configuration while preserving the other values, that would be epic.

In summary:

Below is a screenshot of the default concrete ULS configuration. All I want to do is uncheck “Minimum shear reinforcement acc. to 9.3.2 and 9.6.4” and leave everything else exactly the same.

If I set only that field to False, RFEM wipes some of the other values (for example, it turns “Use required longitudinal reinforcement” to False).
If I try to set minimum shear reinforcement to False and then explicitly re-set “Use required longitudinal reinforcement” to True, the update still does not stick.

This is why I’m trying to understand the correct way to update a ULS configuration through the API without RFEM regenerating or overwriting other settings.

Hi,

I am still struggling to accomplish editing a Concrete Design Ultimate Configuration to disable Minimum Shear Reinforcement and Use Required Longitudinal Reinforcement.

I’ve viewed Design Configuration — Dlubal API documentation but it only changes one which I was able to do, its modifying 2 that I couldn’t get working.

I saw that in 6.12.0010 a feature was added - '“Implementation of the JSON format in the export of tables via the "File" menu”. I was hoping I could export the concrete design ultimate configuration to learn how RFEM6 stores its info but its not an option to export. Likewise, if I export my model to python it doesn’t show the concrete design ultimate configuration. This makes figuring out how to do it a bit difficult, so I would appreciate some guidance (and the confirmation that it is possible to modify two values!)

Thanks,

Samuel

Hi Samuel,

Sorry for the delayed response. I would try to modify your code in the following manner:

from dlubal.api import rfem, common

# Connect to the RFEM application
with rfem.Application() as rfem_app:

    # --- Concrete Design | ULS Configuration ---

    # Retrieve Design ULS Configuration TreeTable
    concrete_uls_config: rfem.concrete_design_objects.ConcreteDesignUlsConfiguration = rfem_app.get_object(
        obj=rfem.concrete_design_objects.ConcreteDesignUlsConfiguration(no=1)
    )
    settings_surface_ec2 = concrete_uls_config.settings_surface_ec2
    print(f"\nSETTINGS_SURFACE_EC2:\n{settings_surface_ec2}")

    settings_surface_ec2_update = rfem.concrete_design_objects.ConcreteDesignUlsConfiguration.SettingsSurfaceEc2TreeTable()
    common.set_tree_value(
        tree=settings_surface_ec2_update,
        path=['limits_of_reinforcement_areas','minimum_shear_reinforcement'],
        value=False
    )

    rfem_app.update_object(
        rfem.concrete_design_objects.ConcreteDesignUlsConfiguration(
            no=1, settings_surface_ec2=settings_surface_ec2_update
        )
    )

Hopefully, this will help for now. As for TreeTables in general, we're still working on improvements and simplifications. For example, we're exploring ways to modify the original TreeTable directly instead of creating a new one with just the modifications. Stay tuned, and sorry that the API is still a bit live.

Regards,