RFEM6, WebService API: modify existing objects


Situation: I have existing model in RFEM6 v.12


My Need: To modify existing objects in the model


Problem: There is no 'model.modify' method, but only 'model.Set_ ...' method.

As an example, I would like to move a node, as in the example below. When I use the model.set method, it does not over-write the existing node, and basically nothing happens.

line l = model.get_line(140);

node n1 = model.get_node(l.definition_nodes[0]);

n1.coordinate_2 += 2;

model.begin_modification("node move");

model.set_node(n1);

model.finish_modification();

So I need to follow this in efficient and tedious approach:

  1. get an instance of the node from the model using the model.get method,
  2. delete the node from the model
  3. modify the instance of the node
  4. set the instance of the node back to the model using the model.set method.

moving a node was just a simplified example, but I have the same problem with any type of modification.


Question: is there a way to modify the objects in the model without deleting them?


Idea: Can you provide a method or modifying class object for functionalities you have in the GUI? for example, a class named 'move_or_copy' with the same inputs as in the GUI?

Hello PSA001,

If you want to move a node, you don’t need to delete it as far as I know. You get the node, modify it and set it back. If the number keeps the same, the former node is overwritten.

I’m sorry but the manipulation functions like move, rotate, scale… are not implemented in the API the moment.

Best Regards

Thomas

Hello,

I would like to make a general comment about API I (SOAP) and API II (gRPC).

Further development of API I has been discontinued. This means that no new functions will be added. However, API I will not be removed.

All new developments are taking place in API II. A function for moving/copying was also recently added there.

Frank

1 Like