Packages are namespaces that contain member elements that may be owned or unowned. It is used as a container for organizing other elements within the model. For more information, see the Key concepts page. Additionally, a package can import members of another package as unowned members. You can also filter imported elements based on certain conditions. 

Creating package elements

Creating a package element via the Textual Editor

To create a package element via the Textual Editor


  1. In the Textual Editor, place the cursor where you want to create the element and declare the keyword: 
    1.  package.

    2.  library package.
  2. Specify the element name.
  3. (Optional) Specify the package.
  4. Click the Synchronize button.

    library package Policies;  // library package element  

    package 'Vehicle Features' {  // package element
        private import Policies::**;
        filter @SysML::Systems::PartUsage;

Creating a package element via the Create Element command

To create a package element via the Create Element command


  1. In the Containment tree, right-click a root namespace, and in the shortcut menu, click Create Element.
  2. In the Create Element dialog, select one of the following:
    1. package to create a package element.
    2. library package to create a library package element.
  3. Name the element.
  4. (Optional) Specify the package.

Specifying packages

Importing elements to packages

An import relationship allows one package to import memberships from another package. The member elements from imported memberships become (unowned) members of the importing package in addition to being members of the imported package. In particular, this allows members of the imported package to be referenced in textual notations within the scope of the importing package without having to qualify the member names with the name of the imported package. 

Specifying element import filters 

Packages have the capability to filter elements upon import based on certain conditions, usually defined in terms of the metadata provided by annotations of those elements. Only elements that meet all filter conditions become imported members of the packages. 

Package members display in symbolic views

  • To display package members in the Members compartment of the package symbol, display the compartment.
  • To control whether the Members compartment displays only owned members or imported ones as well, use the Show Only Owned symbol style.