Creating Package Diagrams

mbse 101

Creating Package Diagrams

What if we had to share what our model organization was to a manager who doesn’t understand MBSE? Or maybe we want to quickly bring new modeling team members up to speed with how we structured our model? Creating Package Diagrams can help us out in both these use cases.

What is A Package Diagram?

A package diagram is used to graphically represent the containment structure of a system model. As we create packages, we are also creating containment relationships. These relationships show what element is contained is within another model element. Think of a nested folder structure and that’s essentially containment!

Let’s Create A Package Diagram

creating package diagrams sysml

We will right-click on the ‘Model’ element, Create Diagram, and search for ‘Package Diagram’. Since we’re using SysML, we’ll pick the ‘SysML Package Diagram’.

Here’s another way to create Packages. We will click on ‘Package’ in the diagram tool bar and a nameless package appears in our containment tree.

creating package diagrams containment tree
creating package diagrams deleting

Ok I’ll delete this now but to delete it permanently, I will have to delete it within the containment tree. This applies to any model element that must be removed permanently.

Ok! Back to creating a Package Diagram.

We will drag the ‘Structure’ Package from our containment tree onto our diagram.

creating package diagrams dragging
package diagrams containment relationship

To see the containment relationships, we will right click and select ‘Display Related Elements’. We’ll get a window here and let’s select ‘Containment Relationships’.

MagicDraw/Cameo gives the option of showing either ‘Incoming’, ‘Outgoing’ or ‘Both’. We’ll select ‘Both’ and the related packages will appear on our diagram.

Connecting these packages are the containment relationships drawn in the hierarchy of how our packages are nested.

nested package diagrams
package diagrams display inner elements

But if we have a lot of packages in our model, a node-to-node representation of our package containment can get a little messy.

Fortunately, we have another option with the use of embedded representation. We can do this by right-clicking the package, and select ‘Displaying Inner Elements’.

There! Now we can see all the packages within the Structure Package.

package diagrams embedded representation

Ok! So we will use the embedded representation for our package diagram. Let’s select each of these packages and drag them onto our diagram. And we’ll show the inner elements for each.

final package diagram

Keep in mind that there are plenty of ways of building a package diagram like this. It usually depends on who your stakeholders are and for what purpose they are using a diagram like this for.


1 thought on “Creating Package Diagrams

  1. Pingback: What Are Use Cases? - Beyond MBSE

Leave a Reply

Your email address will not be published. Required fields are marked *