To minimise the number of requests, I add all elements (nodes, members, joints, etc.) to a list and send them to the program together with one single request.
for example:
rfemLstNodes.append(rfem.structure_core.Node(no=1, coordinate_1=0.000, coordinate_2=0.000, coordinate_3=0.000))
rfemLstNodes.append(rfem.structure_core.Node(no=1, coordinate_1=1.000, coordinate_2=0.000, coordinate_3=0.000))
# combine all single lists to one list
lstNewObjects = [*rfemLstHinges,
*rfemLstNodes,
]
# update model
rfem_app.create_object_list(lstNewObjects)
Is the minimised request option also available for retrieving results with the "RFEM_app.get_result_table(" command or do these always have to be queried individually?
From my understanding, ObjectId can only contain one load case, so it's going to get very expensive to find the max deflection across multiple load cases...
I tried to use ObjectIdList to see if you could create a list of load cases and pass that in, but I got:
TypeError: Parameter to MergeFrom() must be instance of same class: expected <class 'dlubal.api.rfem.object_id_pb2.ObjectId'> got <class 'dlubal.api.rfem.object_id_pb2.ObjectIdList'>.
(which makes sense, as the documentation says loading should be an ObjectId — I just thought I'd see if a list works)
Curious to see how we can get all the load combinations for a table with just one request.
Thanks a lot for the great feedback!
You're absolutely right—currently the loading parameter expects a single ObjectId, so querying multiple load cases or combinations in one get_result_table call isn't directly supported.
However, we already allow this in upcoming calculate_specific method, where you can pass a list of load cases, combinations etc., like this:
So we’ll investigate if this approach can also be applied to get_result_table to allow querying results across multiple loadings in a single request.
to get results over multiple load cases you can use:
object_type=rfem.OBJECT_TYPE_DESIGN_SITUATION
instead of:
object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION
In my situation i was looking for results for "NODES_"- and "SURFACES_"-Deformations, where i need two request at the moment.
Maybe it will be possible to minimise both requests into one and get a list with both results.
We are pleased to announce an upcoming webinar focused on the topic of results! This will be a fantastic opportunity to gain valuable insights and deepen your understanding.