﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2940	OMC API: getComponents[i] and getNthComponent(i) does not return the same component for some models	Adrian Pop	Adrian Pop	"Bug report from James Klingler:
{{{#!mo
loadModel(Modelica);

getComponents(Modelica.Electrical.Analog.Examples.CauerLowPassOPV);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 1);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 2);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 3);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 50);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 51);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 52);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 53);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 54);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 55);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 56);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 57);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 58);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 59); // Error expected

getComponents(Modelica.Electrical.Analog.Examples.CauerLowPassSC);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassSC, 57);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassSC, 58);
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassSC, 59); // Error expected
}}}

If you run: 
{{{#!mo
getComponents(Modelica.Electrical.Analog.Examples.CauerLowPassOPV);
}}}
(line 3 of the script), the array returned has length 58. The final object in the array is {{{Modelica.Electrical.Analog.Interfaces.NegativePin}}} with name {{{“n14”}}} but running 
{{{#!mo
getNthComponent(Modelica.Electrical.Analog.Examples.CauerLowPassOPV, 58);
}}}
(line 15 of the script) returns info about {{{Modelica.Electrical.Analog.Basic.Ground}}} with name {{{“Ground1”}}}.
"	defect	closed	high	1.19.0	Interactive Environment	trunk	fixed		jklingler@…
