Generate commands for conversion
There are three advanced variables for that, namely:
Integer Advanced.ActivateSmartDelete = 3 "Updates other classes when deleting class/component [0 - no, 1 - ask, 2 yes (if possible)]";
Integer Advanced.ActivateSmartRename = 3 "Updates other classes when renaming component [0 - no, 1 - ask, 2 yes, 3 - also script]";
Integer Advanced.ActivateSmartRenameClass = 3 "Updates other classes when renaming class [0 - no, 1 - ask, 2 yes, 3 - also script]";
As the comments indicate, setting these variables on 3 (using the Dymola Command window or, in newer Dymola versions, the options which can be seen in your screenshot) results in automatically created conversion commands.
Dymola will write the conversion commands to the model annotation of your library. They will look something like this:
from(
version="3.2.3",
to="Intermediate",
change(item=convertClass("Modelica.Blocks.Continuous.PID", "Modelica.Blocks.Continuous.PID_Controller"),
item=convertClass("Modelica.Blocks.Continuous.FirstOrder", "Modelica.Blocks.Continuous.PT1")))
Export commands to a file
Before Dymola 2022x
You have to convert the commands a little, if you want to have the conversion script in a separate file (instead of the package.mo
of your library).
In a script the above commands would look as follows:
convertClear()
convertClass("Modelica.Blocks.Continuous.PID", "Modelica.Blocks.Continuous.PID_Controller"),
convertClass("Modelica.Blocks.Continuous.FirstOrder", "Modelica.Blocks.Continuous.PT1")
so the same commands, but without item=
and trailing ,
.
With Dymola 2022x
Dymola 2022x can export the commands to a file.
- Open the Attributes dialog of your library from the package browser
- Use the button Convert from Pre-Release... in the Version tab

Dymola will then remove the previously generated commands from the library annotation and copy them in the correct format to the specified file. Note that Dymola will also update the version number of the library and adjust the from
command. If this is not desired, change it back.