Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Dropdown-Menu in Parameters

Dropdown-Menu in Parameters

Hello
I'm programming a library for a project at university. In order to choose different material-parameters I want to have a dropdown-menu with all options.

The parameters ar safed as records:

Code:

record Template

constant Modelica.SIunits.Density Rho =1 "Density";
constant Modelica.SIunits.ThermalConductivity Lambda =1 "Thermal Conductivity";
constant Modelica.SIunits.SpecificHeatCapacity CP = 1"Heat Capcacity";
record S355 = Template(Rho=7850, Lambda=54, CP=461);
record S235 = Template(Rho=7850, Lambda=54, CP=461);
end Template;

and I call them:

Code:

model insulated_Zylinder

  replaceable parameter Thermo.material_database Material = Thermo.material_database.Template() "Material"  annotation (choicesAllMatching=true);

the dropdown doesen't appear, but the parameters are selected if I insert the path of the parameter manually

Can somebody please tell me what my mistake is?

Thanks


Edited by: Baertschf - Oct-11-16 16:23:45

Re: Dropdown-Menu in Parameters

We do not have yet support for choicesAllMatching and replaceable classes. Some work is under way to fix this in the near future.
See: https://trac.openmodelica.org/OpenModelica/ticket/2079

There are 0 guests and 0 other users also viewing this topic