Hello,
I would like to activate double bending as shown in the image below but using Python (via the API). What is the line of code, please?
Have a nice day,
Hi amazigh,
here is a nice example how the uls settings are used via the API:
Design Configuration — Dlubal API documentation. That should put you on the right track.
If it doesn't work for you please send me your py-file, and I'll have a look on it.
Best regards
Robert Milrath
Thank you for your message. I did look at this example and even built another line thanks to the DLUBAL teams. But I can't seem to replicate the same thing for my current project.
def ULS_configuration()->list:
config_ELU = []
# Definition of EC3 parameters
settings_ec3 = rfem.steel_design_objects.SteelDesignUlsConfiguration.SettingsEc3TreeTable()
# General | Verification of cold-formed sections | Perform calculation | Limit inclination of principal axes
common.set_value_by_path(tree=settings_ec3,path=['design_of_cold_formed_sections','design_of_cold_formed_sections_activate','alpha_lim'], value=radians(10))
## Stability | 2D - General method | Adapted methods
#common.set_value_by_path(tree=settings_ec3,path=['property_adapted_method'])
# Update ULS configurations
config_ELU.append(rfem.steel_design_objects.SteelDesignUlsConfiguration(no=1,user_defined_name_enabled=True,name="ULS_configuration",assigned_to_all_member_sets=True,settings_ec3=settings_ec3))
return config_ELU
Hi amazigh,
"Adapted method (enable double bending)" is a key in the tree table
settings_ec3 of the SteelDesignUlsConfiguration. It depends on three other
keys, so all four go into one update_object call:
# Single update_object call with all dependent keys
cfg = rfem_app.get_object(rfem.steel_design_objects.SteelDesignUlsConfiguration(no=1))
settings = cfg.settings_ec3
common.tree_table.set_values_by_key(settings, "extensional_methods", [True])
common.tree_table.set_values_by_key(settings, "european_lateral_torsional_buckling_curves", [True])
common.tree_table.set_values_by_key(settings, "interpolation_acc_to_eq_666", [False])
common.tree_table.set_values_by_key(settings, "adapted_method", [True])
rfem_app.update_object(rfem.steel_design_objects.SteelDesignUlsConfiguration(
no=1, settings_ec3=settings
))
Please note that this requires version 2.15.1 or newer of dlubal.api
(US 35615). On older versions the update will not come through as expected.
The four keys mirror the nesting in the dialog. adapted_method sits under two
parents, and if those stay off the value is stored but inactive, exactly like a
greyed-out checkbox:
Calculation Method
2D - General method (4 degrees of freedom)
Extension methods <- extensional_methods
( ) Interpolation acc. to Eq. 6.66 <- interpolation_acc_to_eq_666
(o) European lateral-torsional buckling curve
[x] Adapted method (enable double bending)
The two radio siblings are mutually exclusive, which is why
interpolation_acc_to_eq_666 is set to False in the same call.
If the setting is written but the design check does not change, the member is
probably not being designed by the general method acc. to 6.3.4 in the first
place - let me know and we can look at that separately.
One last detail: these keys belong to settings_ec3, that is EN 1993 first
generation including the NF annex. For EN 1993 | 2nd | CEN | 2022-07 the table
is settings_ec3_v2 and the keys differ.
Best regards
