How to Draw a UML Diagram with SmartDraw

SmartDraw is designed to help you create UML diagrams quickly and easily. Watch this video.

UML tutorial video

Finding the UML Symbols and Templates

SmartDraw has a number of pre-made UML templates located in the UML folder, accessible on the left hand side of the SmartDraw template dialog. This is the first thing you see when you open SmartDraw. To start drawing, simply open any of SmartDraw's UML templates.

A symbol library filled with common UML symbols and notations is docked to the left of the drawing area in what's called the SmartPanel.

UML templates

Using the SmartPanel

Every UML SmartTemplate opens with a specialized UML SmartPanel docked to the left of the work area. This panel will guide you through creating any UML diagram by making commonly used symbols and tasks easily accessible.

UML symbols

Adding Components to Your Diagram

You can add a symbol to your drawing by selecting it in the gallery preview of the SmartPanel and then clicking anywhere on the page. This action is called stamping. You also use the traditional drag-and-drop methods to add a symbol to your diagram.

UML drag and drop

Connecting Lines to Shapes

Most UML diagrams involve connecting one or more shapes to each other using lines.

To connect two shapes, click on Connect Shapes in the SmartPanel. Your mouse will become a pencil. Touch one end of the pencil to the shape you're trying to connect and without letting go of the mouse drag the line to the edge of the other shape. When you see the anchor symbol, you can let go of the line and it will attach to the object.

By default the connecting line will be a segmented line, but you can choose a straight line, an arc, or something else from the Line Shape drop-down menu on the SmartPanel.

Adjusting Line Style
To adjust a line's style, select the line, then go to the Lines command in the Shape Styles group. Here you can adjust the thickness, create a dashed line, or select a different color from the palette.

UML lines

Adding Arrows
To convert a regular line to one with an arrow, select the line, then go to Arrowheads under the Tools group. Click on Custom for more options and choose the appropriate arrowhead for the type of relationship you want to illustrate.

UML custom arrows

Connected Shapes

Once connected, lines and shapes stay connected, even if they are moved or stretched.

To detach a line from an object it is linked to, click on the line, then pull the end knob away from the object.

Connected shapes

Dropping Shapes on a Line

In UML sequence diagrams, execution occurrences or activation boxes are linked to vertical lifelines. First, make sure that Allow Shapes to Link to Lines is checked under Options in the SmartDraw Application menu.

SmartDraw shapes link to lines via a special attachment point located by default in the center of the shape. Drag the shape over the line so its center (or attachment point) is near the line. As the shape's attachment point comes in contact with the line, the cursor changes to an anchor, and the connection point appears as a black dot.

Sometimes, the shape rotates 90 degrees when it attaches to a line. To make sure that the shape retains its own angle of rotation, select the line and choose Horizontally under Direction command on the Paragraph group on the main ribbon.

To break the link between a shape and a line, just drag the shape away from the line.

Dropping shapes on lines

Generalization Relationship and Finding Symbols

Generalization or inheritance relationships can be created in using one of the many software design symbols contained in SmartDraw. As with many symbols, the hard part may be finding them.

By default, the SmartPanel displays a single gallery. To find more symbols and library, click on the title bar of the library to show a drop-down menu of options. You can choose from some default UML symbol libraries or opt to search SmartDraw's entire collection by clicking on More.

Finding UML symbols

In this case, the symbol for generalization is contained in the UML library. Open it and drag or stamp the symbol to the page.

Add a symbol

Attaching Shapes to a Generalization Relationship

A generalization symbol automatically has two subtypes attached to it. You can drag additional subtype boxes to the automatic connector to attach them. The connector is a special line tool that automatically connects several shapes in evenly spaced patterns. As shapes get close to the connector, the outline of the moving object jumps to the closest link point, showing where it would connect if you released it. Releasing the mouse attaches the object to the connector at the selected link point.

Attaching shapes

Adding and Editing Text

To add text to a shape or a line, select it and start typing. Depending on the particular shape, your text will appear inside, below, or above the shape.

For a line, your text will appear centered on the line. Some shapes will already have text on them. To edit this text, double-click on the area you want to edit.

Change Text Style and Color
You can change font size, font type, color, and alignment in the Font and Paragraph groups.

To add text to your work area as an independent object, click on the Text tool in the Tools group or click on Add Text in the SmartPanel.

Editing text

Converting a Shape into a Table

UML objects that specify operations and attributes are depicted as rectangles with rows. You can use the symbols in the UML libraries, or you can draw your own by converting a rectangle shape into a table.

To convert a rectangle, select it, then go to the Table tab and choose Convert to Table. Choose the appropriate number of rows and columns from the dialog box that appears.

Convert to a table

Once your shape is converted, you can use the standard Table menu commands to change a cell's background color as well as the grid line thickness and color. You can also Join and Split cells to further customize your shape. To enter text into a cell, double-click on it and type.

UML class

Resizing Grouped Objects

Many of the symbols in the software libraries are grouped SmartDraw objects. These SmartDraw objects grow and shrink together as if they were one shape. Due to restrictions on text shrinking, some grouped objects will be distorted when shrunk.

To change the restrictions on text shrinking, select the shape, go to the Design tab, and select Text Entry Properties from the Shape Properties group.

Text entry

Check the box under Allow Text to Shrink and specify a small size such as "8". Now, you should be able to shrink your object without distortion.

Text entry properties

If you want even more freedom in editing these symbols, you can ungroup them in the Design tab under the Shape Layout group's Group command.

Once ungrouped, you can stretch, shrink, and grow the elements of a symbol separately and reassemble them to your liking.

Group

Arranging Objects

You can arrange objects on your page by selecting them and moving them with the mouse. For finer adjustments you can use the arrow keys to nudge the object or objects into place. The Design tab provides a variety of helpful commands that help you position your objects better.

For example, to align a number of class objects to each other, first, select the objects you want to arrange. Do this by clicking on each object in turn (while holding down the Shift key).

The last object you click has black selection handles and is called the Target Object. When you use the Align or Make Same Size commands, all the selected objects will be aligned or sized to match the target object.

Arrange objects Align objects Make the same size

Arranging Objects Vertically

You can think of the objects in your drawing as a vertical stack of blocks. Objects drawn earlier are on the bottom of the stack while objects drawn later are at the top of the stack. The object drawn last is the shape that's on top.

If a recently drawn object like a loop on a sequence diagram covers parts of your drawing, you can go to the Shape Styles group and select the transparent fill from the Fill command or you can go to the Design tab and choose Send to Back on the Shape Layout group to change the order of the stack.

Set to transparent Send to back Fixed loop

Rotating Objects

Although most software diagrams have a horizontal layout, there might be cases where you will need objects to be at an angle. Most objects have a rotating handle near their right edge. To rotate an object manually, move your cursor over the handle until it changes into a circular arrow, click down with the mouse, and rotate. When finished rotating, release the mouse to see the rotated object.

Rotating images

When on object is too small to have a rotator handle or you want to rotate it more precisely, select the object, go to the Design tab, and using the Rotate command, specify the exact angle of rotation within one tenth of a degree.

You can rotate straight lines, any shape, and even most imported items. However, you cannot rotate segmented lines, curves, automatic connectors, and bit maps. Objects also don't rotate when linked. To rotate a hooked element, such as the initial and final state symbols, first unhook it and reattach it only after it's been rotated.

Rotate