I am using gRPC to create timber material to be used in Timber Design.
However the API documentation is not clear in how I can modify specific timber parameters such as Strenght and Moduli properties in Material Values
It seems I need to edit properties in MaterialValuesTreeTable, but it is not clear which keys to use.
Can someone help me with that?
Hi marciosarto,
you'll find all needed informations in the documentation in the topic Custom Material — Dlubal API documentation.
from dlubal.api import rfem, common
with rfem.Application() as rfem_app:
material: rfem.structure_core.Material = rfem_app.get_object(
rfem.structure_core.Material(
no=1
)
)
# IMPORTANT: get tree table and print to get the keys shown
material_values_tree = material.material_values.rows[0].material_values_tree
print(material_values_tree)
common.set_values_by_key(
tree=material_values_tree,
key='e',
values=[14500000000]
)
# Update material
rfem_app.update_object(
obj=rfem.structure_core.Material(
no=1,
user_defined=True,
material_values=material.material_values,
)
)
I hope this helps.
Best regards
Robert Milrath