Expert Insights

The "Capture Parameters" command: For tidying models

Written by Garron Fish | Jan 13, 2019 11:15:00 PM

In Dymola 2019 FD01 the functionality of Capture Parameters > As Model and Capture Parameters > As Favorite command was enhanced so that they can be used for tidying models that are extended from other models rather than from base classes. This blog entry describes this tidying process in more detail.

Simplifying development models

When developing models it is typical that models are created tht are extended from other development models rather than from the base models. This can result in messy models such as ModelB in Figure 1.

Figure 1. Example of a model extended from another model

ModelB in Figure 1 is extended from ModelA which contains the modifier for a. The Capture Parameters functionality supplies a method for creating the equivalent of ModelB extended from BaseClass. This can be done as follows:
1. Open the model (ModelB in this case).
2. In the Component Browser right click on the desired base class (BaseClass in this case).
3. Select Capture parameters > As Model

This process is performed in Figure 2.

Figure 2. Use of Capture Parameters to modify what a model is extended from

This process can be used to generate a model identical to ModelB based on BaseClass, such as in Figure 3.

Figure 3. ModelC is equivalent to ModelB; however it is extended from BaseClass rather than ModelA.

This is useful if you want to tidy up your model, understand what modifiers are being used, make the model only dependent on the base class’s models. For further information refer to page 20 of the Dymola Release Notes.pdf for Dymola 2019 FD01.

Written by: Garron Fish – Chief Engineer