Base Data#
![]() |
In this example we will demonstrate:
|
from dlubal.api import rsection
with rsection.Application() as rsection_app:
# Step 1: Retrieve the Base data (active model)
base_data: rsection.BaseData = rsection_app.get_base_data()
print(f"BASE DATA:\n{base_data}")
# Step 2: Modify the values in Base data object
# Main model data
base_data.main.model_description = "cold_formed"
base_data.main.comment = "thin_walled"
base_data.main.analysis_method = rsection.BaseData.Main.ANALYSIS_METHOD_THIN_WALLED
# Add-ons activation
base_data.addons.has_effective_section_properties_active = True
# Standards assignment
base_data.standards.effective_section_standard = rsection.BaseData.Standards.EFFECTIVE_SECTION_STANDARD_EN_1993_1_3_COLD_FORMED
# Step 3: Apply the updated Base data to the model
rsection_app.set_base_data(base_data=base_data)
using Rsection = Dlubal.Api.Rsection;
ApplicationRsection? RsectionApp = null;
try
{
RsectionApp = new ApplicationRsection();
Rsection.BaseData? baseData = await RsectionApp.get_base_data();
Console.WriteLine($"BASE DATA:\n{baseData}");
baseData.Main.ModelDescription = "cold_formed";
baseData.Main.Comment = "thin_walled";
baseData.Main.AnalysisMethod = Rsection.BaseData.Types.Main.Types.AnalysisMethod.ThinWalled;
baseData.Addons.HasEffectiveSectionPropertiesActive = true;
baseData.Standards.EffectiveSectionStandard = Rsection.BaseData.Types.Standards.Types.EffectiveSectionStandard.En199313ColdFormed;
await RsectionApp.set_base_data( baseData: baseData);
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
finally
{
if (RsectionApp != null) await RsectionApp.close_connection();
}