Chapter 5: Working with Libraries

About Libraries

A library is an arbitrary collection of useful designs that can be freely inserted into projects. Unlike notation templates, libraries are unstructured and intended to save the user time and effort in creating their own frequently-used designs. They also provide a convenient means for sharing useful designs with other users. Libraries can be easily modified/extended without affecting the projects that have used them.

The designs contained by a library are divided into two categories:

A normal UMLStudio project is used for creating a library (e.g., The library should be partitioned into categories of related designs by putting each category of designs in a separate model in the project. Specifically, symbol designs and pattern designs should appear in separate models.

For example, to create a library called MyLibrary that provides three categories of symbols (General, Communication, and Leisure), and two categories of patterns (Creation and Transformation), create a project called, and create five models inside it and name them accordingly. Select each model and create each symbol/pattern for that category as a group.

The folder in which UMLStudio is installed, contains a subfolder (called Libraries) where you can place your libraries. The predefined libraries that are shipped with the product also appear in this folder. One of these libraries can be nominated as the default library. The default library can be set via the Tools:Options dialog. When you launch the application, it automatically opens and loads the default library, so that it is ready for use.

To use a library, the user selects a design from the library menu and clicks in the drawing pane. An exact copy of the design is thus inserted into the current model. The insertion is called a replica of the original design.

The following diagram illustrates the appearance of the library menu when the sample library shipped with the product ( is loaded.

The first set of submenus inside the menu contain the library symbols. The second set of submenus contain the library patterns. (Each submenu corresponds directly to one model within the library project file.)

Library symbols can be inserted in a project either as primitives or as places. This is controlled by the first two options in the menu. The third command (Load Library) allows you to load a different library.

The following diagram illustrates the appearance of a submenu from the patterns section of the menu:

Library Design Rules

The following rules should be observed when creating or modifying a library:

Library versus Template

The key differences between a library and a notation template are:

Generic Editing Tasks

This section describes the generic tasks which you would do when manipulating libraries.

To create a new library

To modify an existing library

To load another library

The new library is loaded, replacing the previous one.

Table of Contents | Chapter 4 | Chapter 6

Copyright 1996-2010 PragSoft Corporation (