Create a UML component diagram

Note: The UML Model diagram that you use to create the component diagram is only available until Visio 2010. However, the UML Component diagram template is available in newer versions of Visio. For more information, see Create a UML component diagram.

Component diagram displaying the structure of software code as cohesive components

Callout 1 In a component diagram, components are generic types rather than instances. To show component instances, use a deployment diagram.

Callout 2 Dependencies indicate that a client component is dependent upon a supplier component in some way.

  1. In Visio 2010: Under Template Categories, click Software, and then click UML Model Diagram, and then click Create.

  2. In the tree view, right-click the package or subsystem in which you want to include the component diagram, and then on the New menu, click Component Diagram.

    A blank page appears, and the UML Component stencil becomes the top-most stencil. The workspace displays 'Component' as a watermark. An icon representing the diagram is added to the tree view.

    Note: If the tree view isn't visible, point to View on the UML menu, and then click Model Explorer.

  3. Drag a Component shape onto the drawing page for each component you want to represent.

  4. Where appropriate, drag an Interface shape onto the drawing page and glue the endpoint without the circle to a component shape.

    Add an interface to a class, component, or other elements

    1. In a static structure, component, or deployment diagram, drag the lollipop Interface shape onto the drawing page.

    2. Glue the endpoint without the circle to a connection point Connection point image - blue X on the class component, or other element.

    3. Double-click the Interface shape to add a name, operations, and other property values.


      You can also represent an interface with a rectangular Interface shape that resembles a class. Use this shape when you want to display a list of the interface operations.

      To change the type of shape that displays for an interface, right-click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.

  5. Use Dependency shapes to indicate the relationships between components or between one component and another component's interface.

    Indicate a dependency relationship between UML elements

    1. Drag a Dependency shape from the UML Static Structure, UML Deployment, or UML Component stencil onto the drawing page and place it near the elements you want to relate.

    2. Glue the endpoint with an arrowhead to a connection point Connection point image - blue X on the element the other element depends on. Glue the endpoint without an arrowhead to a connection point on the element that depends on the other element.

    3. Double-click the dependency to add a name, stereotype, and other properties.

      Tip: If you want to indicate a trace, refinement, usage, or binding dependency, you can use the Trace, Refinement, Usage, or Binding shapes from the UML Static Structure stencil.

  6. Double-click any shape to open its UML Properties dialog box where you can add a name, attributes, operations, and other properties.

  7. Save the diagram.

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.