Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMEdit reports "Failed to evaluate expression" #11388

Closed
mwetter opened this issue Oct 17, 2023 · 6 comments · Fixed by #11403
Closed

OMEdit reports "Failed to evaluate expression" #11388

mwetter opened this issue Oct 17, 2023 · 6 comments · Fixed by #11403
Assignees

Comments

@mwetter
Copy link

mwetter commented Oct 17, 2023

Description

Steps to Reproduce

Open OMEdit with OMEdit --NAPI=true and open for example Modelica.Fluid.Vessels.OpenTank. This shows multiple entries such as

[4] 08:39:45 Scripting Notification
Failed to evaluate expression.
showDesignFlowDirection could not be found
Failed to evaluate expression.
allowFlowReversal could not be found
Failed to evaluate expression.
showDesignFlowDirection could not be found
Failed to evaluate expression.
port_a_exposesState could not be found
Failed to evaluate expression.
...

The same also happens with many models of Buildings.Fluid.

Expected Behavior

Is there a way to suppress these so that the user is not confronted with a lot of "failures" when browsing models?

Version and OS

OpenModelica 1.23.0~dev-59-g7a41456

OMSimulator 2.1.1~241-g54ebbdc-linux-notlm-debug

@casella
Copy link
Contributor

casella commented Oct 17, 2023

--NAPI=true is no longer needed for version 1.23.0-dev. The new inst-based interface is activated by default. Please try it that way.

@mwetter
Copy link
Author

mwetter commented Oct 17, 2023

Removing --NAPI=true avoids the problem.

@adeas31
Copy link
Member

adeas31 commented Oct 18, 2023

The --NAPI=true is still valid but is not needed since the new inst-based interface is default now.

However, the warnings will be shown whenever the instance based API is used. One idea is to just show them when --Debug=true.

@adeas31 adeas31 reopened this Oct 18, 2023
@mwetter
Copy link
Author

mwetter commented Oct 18, 2023

I agree it would be clearer to show these debug information only if --Debug=true.

I now run OMEdit without --NAPI=true. To remove these messages, I also had to select
image
and restart. As the new inst-based interface is default now, do we indeed need to disable it, or is this just a left over from the old configuration?

This is with

OpenModelica 1.23.0~dev-59-g7a41456
OMSimulator 2.1.1~241-g54ebbdc-linux-notlm-debug

@adeas31
Copy link
Member

adeas31 commented Oct 19, 2023

I agree it would be clearer to show these debug information only if --Debug=true.

See #11403

I now run OMEdit without --NAPI=true. To remove these messages, I also had to select image and restart. As the new inst-based interface is default now, do we indeed need to disable it, or is this just a left over from the old configuration?

If you run without --NAPI=true and check Disable new instance-based graphical editing of models then OMEdit will not use the new instance-based API. Only use this option if you really don't want to use the new instance-based API.

@casella
Copy link
Contributor

casella commented Oct 19, 2023

@mwetter we had to change the set up from "activate new api" to "deactivate new api" because OMEdit remembers the settings you had with the previous version, so to make the new api the default for all installations (also those that replace previous one) it was necessary to define a new option.

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 a pull request may close this issue.

4 participants