You can delete a parameter, constant or variable that has modifiers defined, for example, a start value. In such case a impact analysis is performed.
In this scenario, you create a model with a parameter and define a start value for that parameter. Then you try to delete the parameter and observe the impact analysis.
Before you begin: Do the following to create a model with a parameter that has a start value defined in the model it is used in:
- In a library, create a model MyTest and a model MyApplication.
- In MyTest model, define a real parameter Dummy1.
- Instantiate MyTest in MyApplication.
- In MyApplication, select MyTest, and define a start value of the parameter Dummy1.
The parameter Dummy1 now has a modifier, a start value, defined externally, where the model MyTest is used. This modifier is a part of the Modelica code in MyApplication.
- To delete the parameter Dummy1:
- Activate MyTest.
- From the Parameter and Variable Editor, select Dummy1.
- Select Delete the selected parameter, constant or variable
.
Because of the start value of the parameter, the impact analysis dialog box appears, displaying the following information:
Note:
Connections and other equations cannot be updated.
- In this dialog box, select what action you want performed:
Notes:
- There is a flag
Advanced.ActivateSmartDelete
that corresponding to the selection. The flag can have the following values:Value of flag | Action |
---|
0 | Do not display the message, and always delete without any update. |
1 (default) | Do display the message, and act according to selection in menu. |
2 | Do not display the message, and always update (if possible). |
- There are some limitations of the functionality:
- Connections to the deleted variable are not deleted.
- Equations in the Modelica Text layer using the deleted variable are not updated.
- Undo cannot be applied to deletion of variables.