Saturday, November 13, 2021

Package shape

A package is a grouping of model elements and is represented by a symbol that looks like a manila file folder . You can imagine an entire system description as a package with all the system elements in it, including other packages, models, diagrams, and elements.

Package shape.

Note: Creating and editing UML diagrams on Visio for the web requires a Visio Plan 1 or Visio Plan 2 license, which is purchased separately from Microsoft 365. For more information, contact your Microsoft 365 admin. If your admin has turned on "self-service purchasing," you can buy a license for Visio yourself. For more details, see Self-service purchase FAQ.

A package is the basic organizing element of a UML model. It provides a namespace for the grouped elements. Each element belongs to only one package, and one package can be nested in another. You can create new packages or add elements or views (diagrams) to packages by right-clicking icons in the tree view.

UML Package shape icon

A package is the basic organizing element of a UML model. Each element belongs to only one package, and one package can be nested in another. You can create new packages or add elements or views (diagrams) to packages by right-clicking icons in the tree view.

Dropping a Package shape onto a drawing page automatically creates a new static structure diagram on a new page. (Double-click the new static structure element in the tree view to go to that page.) To create a view, you can drag some of the elements that belong to the package onto the new page.

Name a Package shape and add other property values

Double-click the shape.

Control which property values are displayed on the Package shape

Right-click the shape on the drawing page, click Shape Display Options, and then select or clear options to show or hide values.

Create a diagram within a Package shape

Right-click the shape on the drawing page, and then click Diagrams. Click New, select the diagram type you want, click OK, and then click OK again.

Open a diagram contained in a Package shape

Right-click the shape on the drawing page, and then click Diagrams. Select the diagram you want, and then click OK.

Navigate to other views of the Package shape

Right-click the shape on the drawing page, and then click Views. Select the view you want, and then click OK.

Show, in a view, the relationships between the package and other elements

Right-click the Package shape on the drawing page, and then click ShowRelationships.

Create a new package from the Model Explorer

In the tree view, right-click the package you want to create the new package in, click New, and then click Package.

A new package icon is automatically added to the tree view and the UML Package Properties dialog box opens.

Create a new package from a diagram

  1. In the tree view, double-click the icon for the diagram you want to add the package to.

    The drawing page for the diagram appears.

  2. From UML Static Structure, UML Use Case, UML Component, or UML Deployment, drag a package shape onto the drawing page.

An icon representing the package is added to the tree view.

Create a new diagram from a package

To automatically create a new diagram each time you add a new package to your model, on the UML menu click Options, and then, on the UML Add-In tab, select Create a diagram page when a package or subsystem shape is added to a document.

To create a new diagram if this option is not selected, right-click the new Package shape and click Diagrams, and then click New. Type a name for the diagram and select a diagram type, and then click OK.

Add elements to a package

In the tree view, right-click the package you want to add elements to, click New, and then choose the type of element you want to add.

An icon for the element is added to the tree view.

Represent package contents in a diagram

  1. In the tree view, right-click the icon for the package with contents you want to represent, and then choose the type of diagram you want to include in the package.

    The appropriate stencil and a blank drawing page appear. A watermark with the name of the diagram type appears on the workspace.

  2. Drag shapes representing the elements you want to include in the package onto the drawing page.

No comments:

Post a Comment