How to Draw a UML Diagram with SmartDraw

SmartDraw is designed to help you create UML diagrams quickly and easily. You'll get ready-made templates and symbols as well as tools specifically designed to build the diagram you need.

Sign up for SmartDraw free. Works on your Mac or any other device.

Start Now

Finding the UML Symbols and Templates

SmartDraw has a number of pre-made UML templates located in the Software Design folder, accessible on the left hand side of the SmartDraw template browser. 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 template 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 Shapes with Lines

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

To connect two shapes, all you have to do is add the first shape, select the next shape from the library, and then click Add Right (or Add Left, Add Up, etc.) in the SmartPanel. Your shapes will be connected automatically. You can keep adding shapes in any direction, quickly and efficiently.

You can also connect two shapes manually. Once you have the shapes on your drawing area, click the Line tool in the Home tab. Touch one end of your cursor 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 or shape connector, but you can choose a straight line, a curved line, or something else from the Line Shapedrop-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 Home tab. Here you can adjust the thickness, create a dashed line, or select a different color from the palette.

UML lines

Customizing Arrows
By default, lines are set to be drawn with arrows if you started with a UML template.

To convert any line to one with or without an arrow, select the line, then go right-click and select Arrowheads and choose "None".

UML arrowhead options

You can also add custom arrowhead styles. Click on Custom for more options and choose the appropriate arrowhead for the type of relationship you want to illustrate.

UML custom arrows

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 Design tab.

To add text to your work area as an independent object, click on the Text tool in the ribbon above the work area 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 the number of columns and rows you want and click Insert Table.

Insert a table inside a shape

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.

Edit tables

If you want even more freedom in editing these symbols, you can group or ungroup them in the Design tab.

Once a symbols are grouped you can stretch to grow them as a single unit.

If you ungroup a symbol, 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.

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 Fill command under the Home tab and set the opacity to 0%. Alternatively, you can go to the Design tab and choose Send to Back to change the order of the stack.

Set to transparent
Send to back

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.

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