from dlubal.api import rfem, common

with rfem.Application() as rfem_app:
    obj: rfem.structure_core.Member = rfem_app.get_object(obj=rfem.structure_core.Member(no=9))
    # print(f"obj:\n{obj}")

    # ConcreteShearReinforcementSpansTable
    concrete_shear_reinforcement_spans=obj.concrete_shear_reinforcement_spans
    # print(f'concrete_shear_reinforcement_spans:\n{concrete_shear_reinforcement_spans}')
    row: rfem.structure_core.Member.ConcreteShearReinforcementSpansRow = obj.concrete_shear_reinforcement_spans.rows[0]
    obj.concrete_shear_reinforcement_spans.rows[0].name='huhu'
    print(f"ConcreteShearReinforcementSpansRow:\n{row}")
    # chapter = 'concrete_shear_reinforcement_spans'
    # key1 = 'name'
    # design_path = [
    #     chapter,
    #     key1,
    # ]
    # design_value=common.get_tree_value(
    #     tree=concrete_shear_reinforcement_spans,
    #     path=design_path,
    # )
    # print(f"{design_path}: {design_value}")

    rfem_app.update_object(
        obj=rfem.structure_core.Member(
            no=9,
        )
    )