from dlubal.api import rfem

def main():
    with rfem.Application() as rfem_app:

        info= rfem_app.get_application_info()
        print(info)

        design_situation: rfem.loading.DesignSituation=rfem_app.get_object(
            rfem.loading.DesignSituation(no=1)
        )
        # print(f'design_situation: {design_situation}')

        # Activate concrete design (default is False)
        design_situation.active_for_concrete_design = False
        design_situation.active_for_steel_design = True

        # Activate changes
        rfem_app.update_object(design_situation)

        # Validate changes
        design_situation: rfem.loading.DesignSituation = rfem_app.get_object(
            rfem.loading.DesignSituation(no=1)
        )
        print(f'active_for_concrete_design: {design_situation.active_for_concrete_design}')
        print(f'active_for_steel_design: {design_situation.active_for_steel_design}')

if __name__ == '__main__':
    main()