Hello 
I encountered a problem when creating elements using rfem_app.create_object_list() with the parameter return_object_id=True, in the way it was discussed during the webinar:
https://youtu.be/atyoRgC00vk?si=Fp8el9bGDaJO20NN&t=2460
I received the error:
RuntimeError: Unexpected error: Application.create_object_list() got an unexpected keyword argument 'return_object_id'
I am using dlubal.api version 2.12.12.
Is this approach still valid?
I wanted to use the above to create lines based on newly created nodesโas part of editing an existing model. Therefore, I create nodes without specifying the "no" number (if I understand correctly, when the no parameter is not provided while creating a new node, the program assigns the next available number). However, to create lines on these nodes, I need to specify their numbers.
Should I do this in a different way?
Thank you in advance for your help 
Does anyone have any insights on this topic ? 
I am dealing with existing models so assigning numbers while creating new object (like nodes) is kid of an issue (can't assign existing number).
Can I somehow retrive "last used number" of speciific object (e.g. node) in existing model?
My solution was to get all nodes and retrive a no of las object of list (assuming than list is created with ascending no order):
nodes_list = rfem_app.get_object_list(objs=[rfem.structure_core.Node()])
last_node_no = nodes_list[-1].no
Hello r.sajdak,
To retrieve the last used node number in an existing model, you can use the following script, which queries the ObjectIdList for the specific object type (in this case, nodes):
from dlubal.api import rfem
with rfem.Application() as rfem_app:
# Get object ID list for specific object type
node_id_list = rfem_app.get_object_id_list(
object_type=rfem.OBJECT_TYPE_NODE
)
last_node_number = node_id_list.object_id[-1].no
print(last_node_number)
This approach retrieves the list of all nodes, and by accessing the last element in the object_id list (using [-1]), you can easily obtain the last node number.
If you need further assistance or clarification, feel free to reach out!
Best regards,
1 Like
Thank you for the answer about finding last object id.
Still, can anyone adress the issue with creating elements using rfem_app.create_object_list() with the parameter return_object_id=True like it was presented in the webinar ?