# XML-RPC Communication with Python

**URL:** <https://forum.plexim.com/t/xml-rpc-communication-with-python/1463>\
**Category:** PLECS\
**Created:** [October 29, 2024, 5:06pm UTC](https://forum.plexim.com/t/xml-rpc-communication-with-python/1463 "2024-10-29T17:06:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clem](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@Clem](https://forum.plexim.com/u/Clem)\
**Post date:** [October 29, 2024, 5:06pm UTC](https://forum.plexim.com/t/xml-rpc-communication-with-python/1463/1 "2024-10-29T17:06:01Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![wolfgang](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/wolfgang/32/7_2.png) [@wolfgang](https://forum.plexim.com/u/wolfgang)\
**Post date:** [October 30, 2024, 10:06am UTC](https://forum.plexim.com/t/xml-rpc-communication-with-python/1463/2 "2024-10-30T10:06:51Z")

</div>

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…** ).

---

<div class="post-metadata">

**Author:** ![bernhard](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@bernhard](https://forum.plexim.com/u/bernhard)\
**Post date:** [September 12, 2025, 8:21am UTC](https://forum.plexim.com/t/xml-rpc-communication-with-python/1463/3 "2025-09-12T08:21:18Z")

</div>

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
