Using MS Visio

Using MS Visio


Creating a Document

  1. Start Visio (if you have trouble finding Visio, it might be under "Microsoft Office" as Visio is part of the Office suite)
  2. When prompted to "Choose Drawing Type", select the "Software" category
  3. Scroll down and select "UML Model Diagram (US units)"
  4. That will create a new UML document
  5. On the left you will see several toolbars that contain symbols for creating various kinds of UML diagrams. The symbols for creating Class Diagrams are in the "UML Static Structure" toolbar
  6. You can now drag-and-drop symbols onto the diagram

Selecting Shapes

If it is not already visible, open the shapes window by selecting "View->Shapes Window".

visio shapes

The four most commonly used shapes are: class, binary association, composite, and generalization. These shapes may be dragged onto the canvas and then may be double clicked for editing.


Binary Association

To express a relation between two objects, create a binary association shape and connect the ends to the 'x' marks on the objects it connects. You can change the multiplicity, end names, etc by double clicking on it.

Composition

In MS Visio, composition and aggregation are switched from the vocabulary we use (as in UML Distilled p. 68). This is slightly confusing, but don't let it trip you up. It also uses "shared" to describe aggregation.

Composition and aggregation both demonstrate a "whole/part" or a "has a" relationship. Remember that the diamond is filled (aggregation) if the part can not exist without the whole (ie Company♦---Department means the Departments cease to exist when the Company does).

Aggregation

Aggreation can be shown by:

  1. creating a composite shape
  2. double click on it
  3. click on properties
  4. select "shared" from the Aggreation menu

visio association properties aggregation

As composition and aggregation are special types of associations, you can select to show a filled diamond, no diamond, or a hollow diamond by selecting the properties button and the aggregation type. The shared option is the same as aggregation (white diamond).

Updated September 11th, 2006 : by Christopher Hansen