Skip to content

report info message for non-modifiable parameters - #141

Merged
arun3688 merged 1 commit into
OpenModelica:masterfrom
arun3688:setparameter
Aug 11, 2021
Merged

report info message for non-modifiable parameters#141
arun3688 merged 1 commit into
OpenModelica:masterfrom
arun3688:setparameter

Conversation

@arun3688

Copy link
Copy Markdown
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

1 participant