User manual

Dymola 2013 FD01 Release notes 13
Basic Functionality
A selection of all variables called “phi” in a model can be made using the following
annotation.
model Selection1
annotation (__Dymola_selections={
Selection(name="MySelection",
match={MatchVariable(name="*.phi")})});
end Selection1;
The selection feature can be activated by extending the model containing the selections
annotation:
model MyFullRobot
extends Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot;
extends Selection1;
end MyFullRobot;
It results in the following content of the variable browser:
In addition to the selection, parameters and states are preselected.
Introducing New Names
The MatchVariable has an attribute newName. When newName is used, the variable is
included in a new subtree with the name of the selection. To use the same variable name as
before one can use
newName="%componentPath%%name%" or alternatively %path%.
model Selection2
annotation (__Dymola_selections={
Selection(name="MySelection",
match={MatchVariable(name="*.phi", newName="%path%")})});
end Selection2;
It results in the following additional content of the variable browser: