XML-RPC Communication with Python

Hi,

For the initialization process of the model parameters in PLECS, I am using the optStructs method with a Python code that handles a XML-RPC connection.

I found that it is also possible to read and set values with plecs.get(*componentPath*, *parameter*) and plecs.set(*componentPath*, *parameter*, *value*).

I have the following question:

With the second way to read/write parameters, is this possible to save this new state with the new set parameters, i.e. to save the new .plecs file with the modified parameters (and then to be able to run the .plecs file alone with the modified parameters)?

Thank you.

Best regards,

PLECS does not provide an RPC command to save model files in an automated fashion. Models can only be saved interactively via the menu File > Save (or Save as…).

Hi, I also would like to save the model with the modified parameters. Saving during simulation run does not save the currently used parameters. Do you have an idea how to achieve that by doing additional scripting, etc? Or would it be possible for you do add a “save” command? That would be very nice!

Thank you very much!

Best regards

Bernhard