- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Dropdown-Menu in Parameters
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
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
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Dropdown-Menu in Parameters