Opened 15 years ago

Closed 10 years ago

#1166 closed defect (duplicate)

The annotations of the MSL 3.1 models which contain the ConditionalHeatPort model are not correctly output by OMC.

Reported by: donida Owned by: Adeel Asghar
Priority: critical Milestone: 1.9.1
Component: Interactive Environment Version: 1.5.0RC2
Keywords: Cc: donida

Description

When using the getIconAnnotations and getDiagramAnnotations API method with the MLS 3.1 models which contain the ConditionalHeatPort an error is returned.

To reproduce the bug:

setAnnotationVersion("3.x");

loadModel(Modelica);

getIconAnnotations(Modelica.Electrical.Analog.Basic.Resistor);

Change History (6)

comment:1 by Per Östlund, 15 years ago

getIconAnnotations should probably be getIconAnnotation instead, which works fine for me. getDiagramAnnotation does produce an error message though:

Error: Variable useHeatPort not found in scope <global scope>
Error: Class Line (its type)  not found in scope <global scope>.
Error: No matching function found for Line
Error: Class Line not found in scope <global scope>.
Error: Internal error Static.elabGraphicsArray failed

I'll investigate this.

Edit: Upon further investigation it turns out that the error message is actually from getIconAnnotation (I assumed it worked since it printed a result). getDiagramAnnotation doesn't create an error message.

comment:2 by Adrian Pop, 15 years ago

Per, I suggest you look at some other bug.

This one is not very easy to fix as we do not
have yet access to the instance hierarchy and
the actual values for components while elaborating
the graphical annotations.


Cheers,
Adrian Pop/

comment:3 by Per Östlund, 15 years ago

As Adrian says it's very hard to fix the bug at the moment. I have fixed it partially though, since getDiagramAnnotation didn't handle all cases that it needed. I have now unified getIconAnnotation and getDiagramAnnotation so that they handle the same cases, so getDiagramAnnotation will at least work for this model now.

comment:4 by Martin Sjölund, 10 years ago

Cc: donida, → donida
Component: Interactive Model Editor InterfaceInteractive Environment
Milestone: 1.9.1
Owner: changed from donida to Adeel Asghar
Status: newassigned

Adeel: Is this working correctly now?

in reply to:  4 comment:5 by Adeel Asghar, 10 years ago

Replying to sjoelund.se:

Adeel: Is this working correctly now?

Yes this is working. Now OMC always returns the conditional connectors annotations.
I think you can close this ticket and set as duplicate of #2081.

comment:6 by Martin Sjölund, 10 years ago

Resolution: duplicate
Status: assignedclosed
Note: See TracTickets for help on using tickets.