Python4Capella - Mathematical Solver

Hi, I’m new to Capella and Python4Capella I would like to know if it is possible to capture values from model components, use them to run mathematical calculations within the python script and update the model with the outcome of this calculation all using python4capella. Anyone already tried?Where can I find an example of how to do this?
Thank you very much.

Yes, totally feasible.
I guess you would have to create property-values to store these values in your model, get them with python4Capella. do your calculation, and then update the PV.
There is probably an example script in Py4C that shows how to work with PV, and probably much more information in this forum.
When modifying the model: don’t forget to put your code in a transaction statement (again, see example scripts on how to modify a model).
Stephane

1 Like

Thank you very much!