Opened 15 years ago

Last modified 14 years ago

#1160 closed defect (fixed)

getComponentAnnotations() and getNthComponentAnnotation() API are not working with Modelica standard library 3.x

Reported by: donida Owned by: donida
Priority: critical Milestone:
Component: Interactive Model Editor Interface Version: 1.5.0RC1
Keywords: Cc: donida,

Description

This bug was identified when using the OMC 1.5.0 nightly build on Win XP and the Modelica Standard Library 3.0 and Modelica Standard Library 3.1

The procedure is described in the following:

  1. - download MSL (3.0 or 3.1) and change the OPENMODELICALIBRARY path variable accordingly
  1. - set the new annotation version:

setAnnotationVersion("3.x")

true

  1. - load the MSL:

loadModel(Modelica)

true

  1. - get the list of components within the ChuaCircuit model:

getComponents(Modelica.Electrical.Analog.Examples.ChuaCircuit)

{{Modelica.Electrical.Analog.Basic.Inductor,L,"", "public", false, false, false, false, "unspecified", "none", "unspecified", {}},{Modelica.Electrical.Analog.Basic.Resistor,Ro,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.Electrical.Analog.Basic.Conductor,G,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.Electrical.Analog.Basic.Capacitor,C1,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.Electrical.Analog.Basic.Capacitor,C2,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistor,Nr,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.Electrical.Analog.Basic.Ground,Gnd,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}}}

-> some "null" string are present in the code, probably the AST is missing some elemets

  1. - try to get the components annotations of the ChuaCircuit model:

    getComponentAnnotations(Modelica.Electrical.Analog.Examples.ChuaCircuit)

{{},{},{},{},{},{},{}}

Error: Class Extent not found in scope Transformation while instantiating transformation.extent.

The problem is identical with the getNthComponentAnnotation() API.

Change History (1)

comment:1 by Martin Sjölund, 14 years ago

This is fixed in 1.6.0

Note: See TracTickets for help on using tickets.