Skip to content

Conversation

@arun3688
Copy link
Collaborator

Purpose

This PR checks for non-modifiable parameter when using setParameters() API and display proper info message to users that the parameter cannot be modified.

Example

>>> from OMPython import ModelicaSystem
>>> omc = ModelicaSystem("Test.mo", "Test.Example")
>>> omc.setParameters("dyn=4")
| info |  setParameters() failed : It is not possible to set the following signal "dyn", It seems to be structural, final, protected or evaluated or has a non-constant binding, use sendExpression(setParameterValue(Test.Example, dyn, 4), parsed=false) and rebuild the model using buildModel() API

@arun3688 arun3688 merged commit 85d81e3 into OpenModelica:master Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant