When a component is replaceable, you can redeclare one or several of its
classes.
In a replaceable component, you can redeclare:
- the class of a component when it is inherited
- the class of a subcomponent.
-
From the Component Browser,
right-click a replaceable component, and select Define Redeclare Attributes.
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.
The Content Chooser dialog box is displayed.
- Use the Content Chooser to do any of the following:
For more about the Content Chooser, see Selecting Objects Using the Content Chooser.
- Select or multiselect from the tree.
To multiselect, you must activate Multiselection.
- Use the Search box of the top bar to search and then select or multiselect from the result.
To multiselect, you must activate Multiselection.
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.
- 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 of the redeclaration status.
Note:
You are not allowed to break
connections when redeclaring the component class.
-
Click OK to validate your modifications.
In the diagram, the class in the component is redeclared.