Base Data#

../../../../_images/base_data.png

Retrieving and modifying Base Data of the active model:

  • Retrieving and displaying the Base Data

  • Changing the model type

  • Setting global and local axes orientation

  • Activating add-ons

  • Selecting standards for loads and design

  • Applying the updated Base Data

Keywords:
base data model type global axes orientation standards add-ons
from dlubal.api import rfem

with rfem.Application() as rfem_app:
    rfem_app.create_model(name="base_data")

    # Retrieve the Base Data of the active model.
    base_data: rfem.BaseData = rfem_app.get_base_data()
    print(f"BASE DATA:\n{base_data}")

    # Modify the values in the Base Data object.
    # Main model data
    base_data.main.model_description = "model_type_2D"
    base_data.main.comment = "test version"
    base_data.main.model_type = rfem.BaseData.Main.MODEL_TYPE_2D_XZ_PLANE_STRESS
    base_data.main.surfaces_active = False

    # General settings
    base_data.general_settings.global_axes_orientation = (
        rfem.BaseData.GeneralSettings.GLOBAL_AXES_ORIENTATION_ZUP
    )
    base_data.general_settings.local_axes_orientation = (
        rfem.BaseData.GeneralSettings.LOCAL_AXES_ORIENTATION_ZUP
    )

    # Add-ons activation
    base_data.addons.steel_design_active = True
    base_data.addons.load_wizards_active = True
    base_data.addons.combination_wizard_and_classification_active = True

    # Standards assignment
    base_data.standards.load_wizard_standard_group = rfem.BaseData.Standards.LOAD_WIZARD_STANDARD_GROUP_EN_1991_STANDARD_GROUP
    base_data.standards.load_wizard_standard = rfem.BaseData.Standards.LOAD_WIZARD_NATIONAL_ANNEX_AND_EDITION_EN_1991_DIN_2019_04_STANDARD
    base_data.standards.combination_wizard_standard = rfem.BaseData.Standards.COMBINATION_WIZARD_NATIONAL_ANNEX_AND_EDITION_EN_1990_DIN_2012_08_STANDARD
    base_data.standards.steel_design_standard = rfem.BaseData.Standards.STEEL_DESIGN_NATIONAL_ANNEX_AND_EDITION_EN_1993_DIN_2020_11_STANDARD

    # Apply the updated Base Data to the model.
    rfem_app.set_base_data(base_data=base_data)