Are you ready to talk?

Saving a Modelica Library

Table of contents

In Dymola this choice is made when creating a new package by the checkbox at the bottom of the dialog, see below.  If you later decide you want to change how the package is being stored then select the package, go to the Edit menu and select the Attributes option.

Dymola new package dialog

When choosing to save the package in one file, a single Modelica model file will be created that contains all the classes defined in this package.  Whilst this makes the package easy to copy around between computers it is not really suitable for use with revision control systems.

When choosing to save the package as a directory structure what you will get is a directory structure where each class is stored as a separate Modelica model file.  This approach is very good for use with revision control systems because the revision of each individual class within the library can be managed independently.  An example of the structure you might get is shown below for the Modelica Standard Library:

Modelica package as a directory

Need to talk to an expert?

Our engineering teams are on hand to provide tailored guidance and support with a deep knowledge of the full Dassault Systèmes portfolio.

Want to receive more content like this?

Sign up to receive a weekly roundup of Expert insights as they are published...

  • Related news & articles straight to your inbox
  • Hints, tips & how-tos
  • Thought leadership articles