Opened 14 years ago
Last modified 14 years ago
#1335 closed defect (fixed)
omc cannot handle annotation 3.x for some components
Reported by: | mohsen | Owned by: | mohsen |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | mohsen, Adrian Pop |
Description
If we set the annotations version to 3, then the OMC API getIconAnnotation don't returns the flat model for some components. I have tried it for Resistor, Conductor, EMF..........i am not sure how many more have this problem. Here is the output for 3 of them,
getIconAnnotation(Modelica.Electrical.Analog.Basic.Resistor)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0}
getIconAnnotation(Modelica.Electrical.Analog.Basic.EMF)>> {-100.0,-100.0,100.0,100.0,true,0.1,1.0,1.0}
getIconAnnotation(Modelica.Electrical.Analog.Basic.Conductor)>> {-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0}
I am using MSL31.
One more thing, can someone tell me what is the output of getComponentAnnotations,
getComponentAnnotations(Modelica.Electrical.Analog.Basic.Ground)
{{true,0.0,100.0,10.0,-10.0,-10.0,10.0,270.0,0.0,0.0,-,-,-,-,0.0}}
What does each parameter means? I have looked for it in the Modelica Specifications for 3.2 but couldn't find anything.
One more thing i have noticed is, the default parameter values for the components are empty. Like,
getParameterNames(Modelica.Electrical.Analog.Basic.Resistor)
{R, T_ref, alpha}
getParameterValue(Modelica.Electrical.Analog.Basic.Resistor, R)
6----------------------
Also there are old bug report related to this issue: bug 1166 and 1160
Best Regards
Mohsen
Attachments (2)
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
call to
{{
getParameterValue(Modelica.Electrical.Analog.Basic.Resistor, R)
}}
returns nothing because R has no default parameter! If you call it on T_ref
you will get a value.
You can also get the start value for R. See how in the attached files.
fixed in revision 6860