Opened 11 years ago
Closed 11 years ago
#2666 closed defect (fixed)
Display issues in OMEDIT (r19853)
Reported by: | massimo ceraolo | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.1 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: |
Description
Issue 1
It is not rare that OMEdit does not display the name of a block, and instead shows "%name%". For instance this is the case for the provided model:
PowerSystems.Examples.PowerWorld.PowerWorld, block "dispatcher".
Issue 2
When a "RealExpression" block refers to a long expression, maybe it could be shown with ellipsis. Otherwise we get strange results. See for instance the block "frequency" in the provided model:
PowerSystems.Examples.PowerWorld.PowerWorld.
Change History (5)
follow-up: 2 comment:1 by , 11 years ago
Status: | new → accepted |
---|
comment:2 by , 11 years ago
Replying to adeas31:
So, I am not going to fix it. Change the code from %name% to %name.
Shouldn't %name% be replaced with ComponentName%? %name is still %name, if there's a % after it shouldn't matter. Sure, %name% is probably used incorrectly in the referenced model, but that's another matter.
comment:3 by , 11 years ago
Thank you, both, Adeas and Perost.
I did not check the specifications. Just assumed the Power system library, rather recently delivered (and for which a paper was presented at the March Modelica Conference) was correct.
I'm in contact with a couple of the authors of the Power Systems Library. I will tell them about the second % that should not be there.
comment:4 by , 11 years ago
I agree with Per. So I have fixed Issue 1. Now OMEdit can gracefully handle %name% starting from r20155.
Note that instead of displaying ComponentName% I changed the code to display only ComponentName. Since the specification doesn't say anything about alone % so I assume any single % should be removed. Because if you want to print a % then you should write %%.
I still recommending fixing the library according to the specification OR ask the Modelica group about how should a single % should be handled.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
For Issue 1,
From Modelica Spec 33,
There are a number of common macros that can be used in the text, and they should be replaced when displaying the text as follows:
So, I am not going to fix it. Change the code from %name% to %name.
I will try to fix Issue 2.