Display Modelica Parameters and Other Modifiers of Classes
For all classes you can display parameters and other
modifiers, but not edit them. This is a useful way to see what parameters you
can have access to if you later instantiate the class in a model.
Edit Modelica Parameters and Start Values of Components
You can, in an active and editable class, edit the parameters
and other modifiers of one component, or multiselected components of the same
class, at the same time.
-
From the
Component Browser or from the diagram, select
one component or several components of the same class.
-
Right-click the selected components and select Edit Modelica
Parameters
.
-
To see more information about the parameter, right-click the
parameter box and select
View Parameter Settings.
-
If available, click
Edit
after the box to get help on how to, for example, insert
matrix values.
For more information, see
Command Dialog Boxes and Editors.
-
To find and insert any variable or component name (except
protected ones) from the current model, including variables and components in
subcomponents:
-
Click the small triangle after the parameter or start value
box in the
Parameters or
Initialization area in the
General tab, then select
Insert component reference.
-
Browse for a variable or component and select it.
The variable or component, including the path to it, is
inserted in the box.
Note:
The current content of the box is not replaced.
-
To use code completion to, for example, write expressions in a
parameter of start value box, press
Ctrl+Space.
-
To work with long text in a text editor, click the small
triangle after the parameter or start value box and select
Edit Text.
-
If allowed, you can change the display units.
Changeable display units have white background.
-
Pause over the display unit.
-
Click the button and select the display unit.
-
To reset the display unit, click the triangle before the
display unit and select
Reset Display Unit.
-
If available, to define a parameter as final, each, or
replaceable, click the small triangle after the parameter or start value box
and select
final,
each, or
replaceable.
For more information, see
Context Menu Commands for Parameter and Start Value Boxes
-
To change the behavior of a start value in the
Initialization area in the
General tab of the dialog box, do the
following:
-
Click the corresponding checkbox.
Three of the four following alternative behaviors are
available:
- True: start-value is
used to initialize
- False: start-value is
only a guess-value
- Inherited: (True:
start-value is used to initialize)
- Inherited: (False:
start-value is only a guess value)
The two first alternatives are always available, and one of
the two last ones, depending on if the inherited value is true or false.
-
Click an alternative.
By being activated or cleared, the checkbox displays
if the start value is used to initialize or if it is only used as a guess
value. However, to see if this behavior is inherited or not, you must click the
checkbox to see which alternative that is selected.
-
Click OK to exit the dialog box and save the
Modelica parameters.
Edit a Modelica Parameter or Start Value Attributes using the Context Command
Edit
You can define an attribute (minimum, maximum, unit...) for a parameter,
variable or subparameters using the context command Edit
in the component Modelica
parameters dialog.
Notes:
- The dialog box looks different
depending on the type of parameter.
- If available, you can also use the
Edit
command after the box.
This command is described in the subtask above.
- A replaceable class used in a
component can be replaced, but you cannot edit its parameters.
Before you begin: The Modelica parameter edition dialog box of
the relevant component must be displayed. In this example, you edit the
attributes of a parameter of real type.
-
In the
Parameters or
Initialization area in the
General tab, click the small triangle after
the box of the parameter to edit, and select
Edit
.
You can also right-click to box to display the
context menu
(except for Boolean parameters).
A dialog box for editing attributes of the parameter
appears.
- Optional:
Edit the name and comment of the parameter.
-
Define the following attributes for the Modelica parameter:
Edit Modelica Parameters and Start Values of the Activated Class Itself
You can also edit the parameters and other modifiers of the activated class itself
using the Modelica parameter dialog.
|