This is the seventh in a series of Basics of Dymola that describe some basic elements and methods to be used within Dymola. It follows on from a post describing some Plotting features found in the simulation tab of Dymola.
After simulating a model there can be animations to be displayed, these are not necessarily included and therefore displayed by default. If there are animation components within a model they can be activated or deactivated, normally using a Boolean parameter named animation.

If there is animation associated with the model, then an Animation Window will be displayed by default upon the finish of the initialisation of the simulation. An animation window can also be displayed by pressing the New Animation button in the simulation tab as shown below.
The animation window displays any activated animation components within the model, in the case of the DoublePendulum (Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum) example shown it includes an axis display, the two links and revolute joints and an arrow showing the acting direction of the world gravity. While this example only uses animations of a fixed size it can also display shapes of varying size, such as a force arrow that extends according to the force applied.
The playback of the animation can be controlled through using the Animation Control group in the simulation tab located in the top left corner, shown below in Figure 2.

Simple manipulation of the view of the animation can be done by clicking and dragging the animation around in the window; holding the shift button while clicking and dragging up or down will zoom in or out of the centre of the model or using the scroll wheel without holding anything else; holding control and clicking and dragging will rotate the model around the origin or selected centre of the followed object, as will using the arrow keys; using control+shift and clicking and dragging rotates the animation around the plan in which it is being viewed.

To follow an object while it is moving during the simulation, the desired object must be selected then right clicked on, this brings up an option to access animation options related to the current object, as shown in Figure 3, then select follow. This both moves the animation display origin now to the origin of that object and also holds that origin in the same position within the window, moving the animation with the object. From the menu shown above the visibility and transparency of the object can be set.
When an object is selected the trace of the object is automatically activated but to activate it permanently without selecting the object the Toggle Trace button will display the trace of the object’s origin. The Toggle History button is only effective when the history settings have been set within the Setup menu that is accessed through the Animation dropdown menu shown in Figure 1. Within the Frames tab the number and interval of history frames can be set; the animation of the frame history can be seen in Figure 4 with the top link having its history deactivated using the Toggle History button.

The colour of the object denotes its history, with the grey objects representing earliest position of the object and the full colour object representing the position of the object at the time selected. The origin is grey as it does not move thus the earliest position is the same as the current.
The animation can be reset to the default position by selecting Reset View when right clicking anywhere in the animation window; reset the sizing and the position to fit the animation within the window by selecting Reset and Fit View; Reset All Objects will return all object animation settings to their default.
When multiple simulations with animations have been run the displayed animation can be selected by right clicking on the name of the simulation in the Variable Browser while having the desired simulation window active and selecting Animate. To animate multiple animations within the same window, ensure that the desired window is active then when right clicking on the simulation name select Animate Together.
Engineering