From the Component Browser,
right-click a replaceable component to display its contextual menu.
Select
Define Redeclare Attributes in the contextual menu.
The Define Redeclare Attributes dialog box appears.
The Component Class area displays:
- the class of the component
- the redeclaring class, if the component class has already been redeclared. In such case, you can retrieve the component class by clicking Erase .
The Select which library to search in area displays the libraries linked with the current library (through an Extends link).
To display other libraries, click Search... then browse from the Select Modelica Package dialog box.
Select one or more libraries, then click OK to validate your selection and exit the dialog box.
The selected library is added in the Define Redeclare Attributes dialog box.
From the Select which library to search in area,
select a library in the list.
The Matching Classes area displays all compatible classes.
Select a matching class.
In this scenario, we select Gearbox.
From the Properties area, define properties for this class:
- Replaceable: to keep the component replaceable. By default, this option is not selected.
- Constrained by: if you select a replaceable option, you can add a constraining clause.
Click OK to close the dialog box and validate your change.
A message informs you if any connections and modifiers must be removed when changing the component class.
Click OK to validate your modifications.
In the diagram, the class in the component is redeclared.