# Introduction

StarUML is a sophisticated software modeler aimed to support *agile* and *concise* modeling.

![StarUML](/files/mys2CNzqsdhnV5vsw936)

The main targets of users are:

* Agile and small development teams
* Professional persons
* Educational institutes

The key features of StarUML are:

* Multi-platform support (MacOS, Windows and Linux)
* UML 2.x standard compliant
* SysML support
* Entity-Relationship diagram (ERD)
* Data-flow diagram (DFD)
* Flowchart diagram
* Multiple windows
* Modern UX
* Dark and light themes
* Retina (High-DPI) display support
* MacPro Pro's Touch Bar support
* Model-driven development
* Open APIs
* Various third-party extensions
* Asynchronous model validation
* Export to HTML docs
* Automatic updates.


# Introduction

StarUML is a sophisticated software modeler aimed to support *agile* and *concise* modeling.

![StarUML](/files/mys2CNzqsdhnV5vsw936)

The main targets of users are:

* Agile and small development teams
* Professional persons
* Educational institutes.

The key features of StarUML are:

* Multi-platform support (MacOS, Windows and Linux)
* UML 2.x standard compliant
* SysML support
* Entity-Relationship diagram (ERD)
* Data-flow diagram (DFD)
* Flowchart diagram
* Multiple windows
* Modern UX
* Dark and light themes
* Retina (High-DPI) display support
* MacPro Pro's Touch Bar support
* Model-driven development
* Open APIs
* Various third-party extensions
* Asynchronous model validation
* Export to HTML docs
* Automatic updates.


# Basic Concepts

## Project

**Project** is a top-level element stored as a single file (`.mdj`).

Modeling a software system requires describing multiple models because it is not enough to describe the system with a single perspective, so we typically make multiple models such as *Use-Case Model*, *Design Model*, *Component Model*, *Deployment Model*, or others in a *Project*.

Typically **Project** is organized as a set of *UMLModels*, *UMLPackages*, or *UMLSubsystems*. If you want to know more about UML Elements, please refer to OMG UML Specification.

## Model vs View

Many users are confusing the difference between **diagramming or drawing** tools such as Microsoft Visio and **modeling** tools such StarUML or Rational Software Architect. First you need to understand a diagram is not a model.

**Model** or **software model** is a description of any aspect of a software system such as structure, behavior, requirement, and so on. A software model can be represented in textual, mathmatical or visual form. A **Model element** is a building block of a software model.

A **Diagram** is a visual geometric symbolic representation of a software model. A software model can be represented in one or more diagrams with different aspects. For example, a diagram can focus on class hierarchical structure while another diagram can focus on interaction between objects. Diagrams consists of **view elements**, which are visual representations of a **model element**.

A **model element** may have multiple corresponding **view elements**. A model element has its own data such as *name*, *stereotype*, *type*, etc. A view element just renders the corresponding model element in a diagram. View elements may exists multiple times in a diagram or in different diagrams. If the *name* of a model element changed, all corresponding view elements reflect the changes in their diagrams.

## Fragment

A **fragment** is a part of a project saved as a separate file with the extension name `.mfj`. Any element can be exported as a fragment, but typically **UMLPackage**, **UMLModel**, and **UMLSubsystem** are the candidates. Once a fragment is exported as a file, the fragment can be reused by importing in a project.

> **See also**
>
> [Import Fragment](/user-guide/managing-project#import-fragment) - To import a fragment file
>
> [Export Fragment](/user-guide/managing-project#export-fragment) - To export an element to a fragment file

## Profile

UML (Unified Modeling Language) is a general-purpose modeling language that could be used to express any kinds of software-intensive systems. In this reason, using UML for a specific domain or platform is not sufficient, so you may need to define UML Profile. StarUML provides UML profiles which can be used to expand UML. For example, UML profiles can be used for the following purposes.

* Profiles for specific programming languages (C/C++, Java, C#, Python, etc.)
* Profiles for specific development methodologies (RUP, Catalysis, UML Components, etc.)
* Profiles for specific domains (EAI, CRM, SCM, ERP, etc.)

## Extension

An extension is a package which adds new features to StarUML. For example, an extension can extend menus, UIs, dialogs, modeling notations, preferences, etc. An extension can be written in JavaScript, CSS3, and HTML5 and can use Node.js integrated in StarUML. Extensions can be easily installed, uninstalled, and updated via the main extension registry.

> **See also**
>
> [Managing Extensions](/user-guide/managing-extensions) - To use extensions.


# Managing Project

## New Project

To create a modeling project, press `Ctrl+N` or select **File | New**.

## New Project from Template

You can start a modeling project by selecting a template. To start a project with a template, select **File | New From Template | \[TemplateName]**. StarUML supports 4 default templates:

* **UMLMinimal** - A single model with UML Standard Profile.
* **UMLConventional** - Use Case Model, Analysis Model, Design Model, Implementation Model, and Deployment Model with UML Standard Profile.
* **4+1 View Model** - Pilippe Kruchten's [4+1 Architectural View Model](http://en.wikipedia.org/wiki/4%2B1_architectural_view_model).
* **Rational** : Approach of Rational Rose Tool.
* **Data Model** : A simple data modeling project.

If you don't want to use pre-defined templates, you need to make your own project structure.

## Open Project

If you have model files (`.mdj`), you can open it in StarUML. To open a model file, press `Ctrl+O` or select **File | Open...** and then select a file in **Open Dialog**.

## Open StarUML V1 File

If you have StarUML V1 model files (`.uml`), you can import by selecting **File | Import | StarUML 1 File (.uml)...**.

## Save Project

You can save the working project into a file by pressing `Ctrl+S` or selecting **File | Save**. If you want to save as another file, press `Ctrl+Shift+S` or select **File | Save As...**.

## Close Project

To close working project, select **File | Close**. If you didn't saved the project, you will be asked to save or not.

## Export Fragment

To export a part of the project as a fragment, select **File | Export | Fragment...** and then select an element to export in **Element Picker Dialog**.

## Export HTML docs

To export the project as a set of HTML documents, select  **File | Export | HTML Docs...** menu item.

## Import Fragment

To import a fragment into the project, select **File | Import | Fragment...**. The fragment will be included as a child of the project.

## Applying Profiles

To include UML Standard Profile, select **Model | Apply Profile | UML Standard Profile (v2)** in Menu Bar.


# Managing Diagrams

## Create Diagram

To create a Diagram:

1. Select first an element where a new Diagram to be contained as a child in **Model Explorer**.
2. Select **Model | Add Diagram | \[DiagramType]** in Menu Bar or select **Add Diagram | \[DiagramType]** in Context Menu.

## Delete Diagram

To delete a Diagram:

1. Select a Diagram to delete in **Model Explorer**.
2. Press `Ctrl+Delete` or select **Edit | Delete from Model** in Menu Bar or **Delete from Model** in Context Menu.

## Open Diagram

To open a diagram, double-click a diagram in **Model Explorer**.

To open a sub-diagram of a model element, select a model element which contains a diagram as a child and then press `Ctrl+Shift+D` or select **Edit | Open Sub-Diagram**.

## Close Diagram

To close a diagram, click the close icon (`x` mark) of a diagram in **Working Diagrams** or press `F4` or select **View | Close Diagram** in Menu Bar.

To close other diagram except an active diagram, press `Ctrl+F4` or select **View | Close Other Diagrams** in Menu Bar.

To close all diagrams, press `Shift+F4` or select **View | Close All Diagrams** in Menu Bar.

## Change Active Diagram

To change active diagram, select a diagram in **Working Diagram**.

To activate the next diagram, press `Ctrl+Shift+]` or select **View | Next Diagram**.

To activate the previous diagram, press `Ctrl+Shift+[` or select **View | Previous Diagram**.


# Diagram Editor

## Scroll Diagram

You can scroll diagram by typical mouse wheel or touch pad scroll gestures. Typically mouse wheel scrolls vertical and mouse wheel with `Shift` key scrolls horizontal.

You can also scroll diagram by dragging with mouse middle button (wheel button).

Or you can also scroll diagram by mouse left button dragging while pressing `Control` key (`Command` for Mac) in Diagram Editor.

## Minimap

Minimap shows the entire diagram and the focusing area of the diagram. Clicking a point on the Minimap will scroll the diagram to the clicked point.

To hide or show the Minimap, toggle by press `Ctrl+Alt+M` (`Cmd+Opt+M`)or select **View | Minimap** in Menu Bar or click Minimap icon in **Toolbar**.&#x20;

## Select Views

You can select views only in select mode (Click cursor icon on **Toolbox** or `ESC` key).

To select a single element, click the element with mouse left button.

To select multiple elements, drag an area including elements with mouse left button.

To select additional element, click the element with mouse left button and `Shift` key.

To select additional multiple elements, drag an area including elements with mouse left button and `Shift` key.

## Move Views

You can move the selected views by 1 pixel using the `Arrow` keys. Alternatively, `Shift+Arrow` keys move the selected views by the grid size.

## Zoom In and Out

To zoom in the diagram, press `Ctrl++` (`Cmd++`) or select **View | Zoom In** in Menu Bar.

To zoom out the diagram, press `Ctrl+-` (`Cmd+-`) or select **View | Zoom Out** in Menu Bar.

To set zoom level to actual size, press `Ctrl+0` (`Cmd+0`) or select **View | Actual Size** in Menu Bar.

To fit zoom level to window and scroll to the center of window, press `Ctrl+9` `(Cmd+9)` or select **View | Fit to Window** in Menu Bar.

You can also zoom in-and-out using mouse wheel with `Ctrl` or `Cmd` key.

You can check the current zoom level in **StatusBar**.


# Editing Elements

## Editing Elements

### Create Element

You have following options to create Model Elements and View Elements.

To create an Element from **Toolbox**:

1. Select **\[ElementType]** in **Toolbox**.
2. Drag on the diagram as the size of element, or link two elements if the element is a kind of relationship.

> **Note**
>
> In most cases, creating an element from **Toolbox** means creating the both Model Element and View Element. For example, if you create a Class in a Diagram from Toolbox, a Class Model Element and a Class View Model which referencing the Model Element will be created. See [Basic Concepts](/user-guide/basic-concepts)

If you have already *Model Elements*, you can create *View Elements* referencing the *Model Element* on a *Diagram*.

To create a *View Element* by drag and drop:

1. Select a Model Element in **Explorer**.
2. Drag the Model Element and drop on a Diagram.

To create a *Model Element* in **Explorer**:

1. Select first an element where a new Model Element to be contained as a child in **Explorer**.
2. Select **Model | Add | \[ElementType]** in Menu Bar or select **Add | \[ElementType]\`** in Context Menu.

### Delete Elements

> **See also**
>
> [Basic Concepts](/user-guide/basic-concepts) - Before deleting elements, you need to distinguish the difference of Model Element, View Element, and Diagram.

To delete View Elements in a Diagram.

1. Select View Elements to be deleted in a Diagram.
2. Press `Delete` or Select **Edit | Delete** in Menu Bar or **Delete** in Context Menu.

> **Note**
>
> Deleting View Elements do not delete Model Elements.

To delete Model Elements:

1. Select Elements to be deleted in a Diagram or in **Explorer**.
2. Press `Ctrl+Delete` or Select **Edit | Delete from Model** in Menu Bar or **Delete from Model** in Context Menu.

> **Note**
>
> Model Elements are always deleted with corresponding View Elements.

### Select Elements

To select view elements in **Diagram Editor**:

You can select an Element in Diagram just by clicking on an Element. If you want to select additional elements while keeping current selections, click on element with pressing `Shift`. When you drag an area, Elements overlaps the area will be selected. Pressing `Shift` also work with dragging.

If you want to select all elements in the Diagram, press `Ctrl+A` or select **Edit | Select All** in Menu Bar or **Select All** in Context Menu.

> **Note**
>
> Selecing an Element on a Diagram means selection of the both Model Element and View Element.

To select a model element in **Explorer**:

In **Explorer**, you can select a Model Element by clicking on an Element.

If you want to select an element in **Explorer** corresponding to the a selected element in Diagram, press `Ctrl+E` or select **Edit | Select In Explorer** in Menu Bar or **Select In Explorer** in Context Menu.

### Copy and Paste

When copying or cutting elements for pasting, a clear distinction has to be made between model elements and view elements. If a model element is copied, it has to be pasted under a model element. In this case, all the sub-elements contained in the selected element are copied together. View elements can be copied within the same diagram or to different diagrams. Copied view elements can be pasted in diagrams only; they cannot be pasted to model elements. Copying and pasting may also be restricted depending on the view element types and diagram types.

To copy and paste view elements in **Diagram Editor**

1. Select view elements in a diagram to copy. (You can select multiple elements. See [Select Elements](/user-guide/editing-elements#select-elements))
2. Press `Ctrl+C` or select **Edit | Copy** in Menu Bar or **Copy** in Context Menu. (To cut view elements, press `Ctrl+X` or select **Edit | Cut** in Menu Bar or **Cut** in Context Menu)
3. Open the diagram where the copied view elements to be pasted. (See open diagram??)
4. Press `Ctrl+V` or select **Edit | Paste** in Menu Bar or **Paste** in Context Menu. The copied view elements will be pasted to the active diagram.

To copy and paste a model element in **Explorer**:

1. Select a model element to copy in **Explorer**.
2. Press `Ctrl+C` or select **Edit | Copy** in Menu Bar or **Copy** in Context Menu. (To cut view elements, press `Ctrl+X` or select **Edit | Cut** in Menu Bar or **Cut** in Context Menu)
3. Select a model element where the copied element will be pasted in **Explorer**.
4. Press `Ctrl+V` or select **Edit | Paste** in Menu Bar or **Paste** in Context Menu. The copied view elements will be pasted to the active diagram. The copied model element can be pasted in where an element is able to contain.

> **Note**
>
> Some elements are not allowed to copy, cut, and paste.

### Undo and Redo

To undo an action, press `Ctrl+Z` or select **Edit | Undo** in Menu Bar.

To redo an undo-ed action, press `Ctrl+Y` or select **Edit | Redo** in Menu Bar.

### Edit Properties

You can edit properties of model elements in **Property Editor**.

### Documenting Elements

You can edit documentation of model elements in **Documentation Editor**.

## Extending Elements

### Assign Stereotype

To assign defined stereotype to elements (e.g. defined in UML Standard Profile):

1. Select model elements to assign stereotype.
2. Click the magnifier icon on the right side of `stereotype` property in **Property Editor**.
3. Select a stereotype in **Element Picker Dialog**.

To assign temporal stereotype to elements:

1. Select model elements to assign stereotype.
2. Enter stereotype name in `stereotype` property in **Property Editor**.

### Add Constraints

To add a Constraint to an element:

1. Select model elements to add a constraint.
2. Select **Model | Add | Constraint** in Menu Bar or select **Add | Constraint** in Context Menu.
3. Edit constraint in `specification` property in **Property Editor**.

### Add Tags

Tag is an element to add extended properties to Model Elements

To add a Tag to an element:

1. Select an Element in **Explorer** or in a Diagram.
2. Select **Model | Add | Tag** in Menu Bar or select **Add | Tag** in Context Menu.

Properties of Tag:

* `name` : Name of Tag
* `kind` : Kind of Tag. `kind` could be one of `string`, `reference`, `boolean`, `number`, or `hidden`. if `hidden` is chosen, this Tag will not be shown on View Element.
* `value` : Value of Tag when `kind` is `string`.
* `reference` : Reference value of Tag when `kind` is `reference`.
* `checked` : Boolean value of Tag when `kind` is `boolean`.
* `number` : Number value of Tag when `kind` is `number`.

To show or hide Tags on View Elements, see [Show Property](/user-guide/formatting-diagram#show-property).

## Finding Model Elements

To find model elements by keyword:

1. Press `Ctrl+F` or Select **Model | Find...** in Menu Bar.
2. Enter keyword in Edit Box.
3. Check **Case sensitive** if you want to find keyword case sensitively, and check **Find in documentation** if you want to find keyword in documentation of elements.
4. Matched elements will be shown on a Bottom Panel.


# Formatting Elements

## Change Font

To change font face, size, and color of view elements:

1. Select view elements in diagram.
2. Show **Font Dialog** by pressing `Ctrl+Shift+F` or selecting **Format | Font...** in Menu Bar or Context Menu.
3. Select font face, size or color and press **OK** button.

![Font Dialog](/files/JzqnIB2hn2jOkfKY8ueQ)

You can also use **Style Editor** to change Font face, size, and color.

## Change Line Color

To change line color of view elements:

1. Select view elements in diagram.
2. Show **Color Dialog** for line color by pressing `Ctrl+Shift+L` or selecting **Format | Line Color...** in Menu Bar or Context Menu.
3. Select line color and press **OK** button.

![Color Dialog](/files/0vjYxhYF9TnIK39RkRYy)

You can also use **Style Editor** to change line color.

## Change Fill Color

To change fill color of view elements:

1. Select view elements in diagram.
2. Show **Color Dialog** for fill color by pressing `Ctrl+Shift+I` or selecting **Format | Fill Color...** in Menu Bar or Context Menu.
3. Select fill color and press **OK** button.

You can also use **Style Editor** to change fill color.

## Change Line Style

![](/files/-LAqLiBegC04kXn6TiwJ)

To change line style of view elements:

1. Select view elements in diagram.
2. Select one of line styles.
   * Rectilinear - Press `Ctrl+L` or select **Format | Line Style | Rectilinear** in Menu Bar or Context Menu.
   * Oblique - Press `Ctrl+B` or select **Format | Line Style | Oblique** in Menu Bar or Context Menu.
   * RoundRect - Press `Ctrl+Alt+L` or select **Format | Line Style | RoundRect** in Menu Bar or Context Menu.
   * Curve - Press `Ctrl+Alt+B` or select **Format | Line Style | Curve** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Auto Resize

To set view elements always resize automatically:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+R` or check (or uncheck) **Format | Auto Resize** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Inherit Style

Typically the style (font, color, etc.) of attributes and operations is inherited from the class view. If you want to set different style of some attributes or operations from the class, turn off the inherit style property.

To set inherit style of view elements:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+K` or check (or uncheck) **Format | Inherit Style** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Word Wrap

To allow text can be shown in multiple lines:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+W` or check (or uncheck) **Format | Word Wrap** in Menu Bar or Context Menu.

## Stereotype Display

An element has six alternative representations based on the stereotype. To change stereotype display:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+0` \~ `Ctrl+Shift+5` or select **Format | Stereotype Display | \[StereotypeDisplayKind]** in Menu Bar or Context Menu.

Supported stereotype display kinds are follow:

* None (`Ctrl+Shift+0`) : Do not show stereotype.
* Label (`Ctrl+Shift+1`) : Show stereotype as a label.
* Decoration (`Ctrl+Shift+2`) : Show stereotype as a decorated icon on the top left.
* Decoration with Label (`Ctrl+Shift+3`) : Show stereotype as a label with a decorated icon.
* Icon (`Ctrl+Shift+4`) : Show element as a icon.
* Icon with Label (`Ctrl+Shift+5`) : Show element as a icon with label.

![](/files/-LAqLiSpqhEoxer85Lm0)

## Show Visibility

To show (or hide) visibilities:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+V` or check (or uncheck) **Format | Show Visibility** in Menu Bar or Context Menu.

## Show Namespace

To show (or hide) namespace:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+N` or check (or uncheck) **Format | Show Namespace** in Menu Bar or Context Menu.

## Show Property (Tag)

To show (or hide) properties (tags):

1. Select view elements in diagram.
2. Press `Ctrl+Shift+P` or check (or uncheck) **Format | Show Property** in Menu Bar or Context Menu.

## Show Type

To show (or hide) types:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+Y` or check (or uncheck) **Format | Show Type** in Menu Bar or Context Menu.

## Show Multiplicity

To show (or hide) multiplicities:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+M` or check (or uncheck) **Format | Show Multiplicity** in Menu Bar or Context Menu.

## Show Operation Signature

To show (or hide) operation signature:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+G` or check (or uncheck) **Format | Show Operation Signature** in Menu Bar or Context Menu.

## Suppress Attributes

To suppress attributes:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+A` or check (or uncheck) **Format | Suppress Attributes** in Menu Bar or Context Menu.

## Suppress Operations

To suppress operations:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+O` or check (or uncheck) **Format | Suppress Operations** in Menu Bar or Context Menu.

## Suppress Receptions

To suppress receptions:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+E` or check (or uncheck) **Format | Suppress Receptions** in Menu Bar or Context Menu.

## Suppress Literals

To suppress literals:

1. Select Enumeration view elements in diagram.
2. Press `Ctrl+Shift+T` or check (or uncheck) **Format | Suppress Literals** in Menu Bar or Context Menu.

## Suppress Columns

To suppress columns:

1. Select Entity view elements in diagram.
2. Press `Ctrl+Shift+U` or check (or uncheck) **Format | Suppress Columns** in Menu Bar or Context Menu.

## Aligning View Elements

To bring view elements on the front:

1. Select view elements in diagram.
2. Select **Format | Alignment | Bring to Front** in Menu Bar or **Alignment | Bring to Front** in Context Menu.

Or, to send view elements to the back:

1. Select view elements in diagram.
2. Select **Format | Alignment | Send to Back** in Menu Bar or **Alignment | Send to Back** in Context Menu.

And, you can align two or more view elements:

1. Select view elements in diagram.
2. Select **Format | Alignment | \[AlignmentKind]** in Menu Bar or **Alignment | \[AlignmentKind]** in Context Menu.
   * Align Left : Align selected view elements to the left.
   * Align Right : Align selected view elements to the right.
   * Align Middle : Center selected view elements horizontally.
   * Align Top : Align selected view elements to the top.
   * Align Bottom : Align selected view elements to the bottom.
   * Align Center : Center selected view elements vertically.

## Layout Diagram

To layout diagram automatically:

1. Open the diagram to be layout.
2. Select **Format | Layout | Auto** in Menu Bar.

If you want to layout diagram in a particular direction:

1. Open the diagram to be layout.
2. Select **Format | Layout | \[Direction]** in Menu Bar. Supported directions are **Top to Bottom**, **Bottom to Top**, **Left to Right** and **Right to Left**.


# Annotation Elements

## Text

To create a Text view:

1. Select **Text** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Text.

You can also create a Text view by just double clicking mouse left button on blank area of diagram.

You can enter multiline text by double clicking the Text view element. If you want to add a newline character, press `Shift-Enter`.

You can align texts inside the TextBox (Text, Note) with **Text Alignment** buttons in **Style Editor**.

![Text alignments for textual annotations](/files/-MjrQzdl-ssviG1ZT4lm)

## Text Box

Text Box is a box has text inside. The difference from Text view, it has border line color and fill color.

To create a Text Box view:

1. Select **Text Box** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Text Box.

You can enter multiline text by double clicking the Text Box view element. If you want to add a newline character, press `Shift-Enter`.

## Note and Note Link

To create a Note with Link on a element:

1. Select **Note** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Note.
3. Select **Note Link** in **Toolbox (Annotation)**.
4. Drag on an element and drop on the Note.

You can enter multiline text by double clicking the Note view element. If you want to add a newline character, press `Shift-Enter`.

## Free Line

Free Line is a multi-point line supporting various line formatting including line style, line pattern, and line-end shapes. You can set these line format in **Style Editor**.

![Styles for Free Line element](/files/-Mjr34aLwPCnYZJODiBl)

To create a Free Line view:

1. Select Free**Free Line** in **Toolbox (Annotation)**.
2. Drag from an end-point and drop on another end-point.

## Hyperlink

To create a Hyperlink view:

1. Select **Hyperlink** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Hyperlink.

You can enter a link for a model element or a URL. To link a model element, click `reference` property in **Property Editor** and select a model element to link in **Element Picker Dialog**. Or to link a URL, enter full URL in `url` property (e.g. `https://staruml.io`).

To open the URL in `url` or the diagram in `reference` property, double-clicking the Hyperlink.  `http://` or `https://` should be included to open in external web browser by double-clicking the Hyperlink. Link to a local file is not supported. If an element (not a diagram) is in `reference` property, it will be selected in **Model Explorer**.

If you want to show Hyperlink name in the diagram instead of URL or element name, check `showName` property in the **Property Editor**.

## Shapes (Rectangle, Rounded Rectangle, Ellipse)

To create a shape view:

1. Select a shape (**Rectangle, Round Rectangle, Ellipse**) in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of shape.

## Image

You can embed an image file (PNG, JPEG, SVG). We recommend to embed an image smaller than 640x640.

To add an image:

1. Select **Image** in **Toolbox (Annotation)**.
2. Click on the diagram at the point you want to place an image.
3. Select an image file (.png, .jpeg/jpg, .svg) in Open Dialog.

Or, you can add an image by drag an image file and then drop on the diagram area.

You can change the image file by double-clicking on the Image view.


# Managing Extensions

![Extension Manager](/files/AOn9LVbKQrk5gBrFLN9p)

## Install Extension

To install an extension from Extension Registry:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Registry** button.
3. Find an extension to install by search.
4. Press **Install** button of the extension.

To install an extension directly from Github repository:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Install From Url** button.
3. Enter Url of the Github project on input box
4. press **Install** button.

To install an extension manually:

1. Get an extension as a `.zip` file.
2. Extract the file on the extensions path.
   * `/Users/<user>/Library/Application Support/StarUML/extensions/user` for Mac OS.
   * `C:\Users\<user>\AppData\Roaming\StarUML\extensions\user` for Windows.
   * `~/.config/StarUML/extensions/user` for Linux.
3. Check a folder in the extensions path and :file:`main.js` file in the folder.
4. Restart StarUML.

## Uninstall Extension

To uninstall an extension:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Installed** button.
3. Find an extension to uninstall by search.
4. Press **Remove** button of the extension.

To uninstall an extension manually:

1. Go to the extensions path.
   * `/Users/<user>/Library/Application Support/StarUML/extensions/user` for Mac OS.
   * `C:\Users\<user>\AppData\Roaming\StarUML\extensions\user` for Windows.
   * `~/.config/StarUML/extensions/user` for Linux.
2. Remove the extension folder to uninstall.
3. Restart StarUML.

## Update Extension

To update an extension:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Registry** button.
3. **Update** button will be shown if the extension has updates.
4. Press **Update** button of the extension.

To update an extension manually:

1. Uninstall extension of old version manually.
2. Install extension of new version manually.
3. Restart StarUML.


# User Interface

## Main Window

![](/files/5BM1ehchXYTs9TpaUgmD)

### Diagram Area (Diagram Editor)

*Diagram Area (Diagram Editor)* shows the currently selected diagram.

### Sidebar

*Sidebar* is the area left containing *Working Diagrams* panel and *Toolbox*.

To show or hide *Sidebar*, press `Ctrl+1` or check (or uncheck) **View | Sidebar** in Menu Bar.

### Working Diagrams

*Working Diagrams* panel shows a list of the opened working diagram. The selected diagram is shown in the *Diagram Area*.

### Toolbox

*Toolbox* shows elements which can be created in the selected diagram.

To create an element: 1. Select an element in Toolbox 2. Mouse down on the Diagram Area and then drag as the size of the element to be created. If the element is a kind of relationship, connect two elements by drag and drop.

To show or hide *Toolbox*, press `Ctrl+5` or check (or uncheck) **View | Toolbox** in Menu Bar.

### Navigator

*Navigator* is the right area containing *Model Explorer* and *Editors*.

To show or hide *Navigator*, press `Ctrl+2` or check (or uncheck) **View | Navigator** in Menu Bar.

### Model Explorer

*Model Explorer* shows the tree structure of model elements.

You can find an element quickly by search box.

To change the order of elements: 1. Select the dropdown menu in the right up corner of **Model Explorer**. 2. Select one of the sorting types

* Sort by Added
* Sort by Name

To show or hide stereotypes in front of element name by check of uncheck **Show Stereotype Text** in the dropdown menu.

You can expand or collapse all tree nodes by select **Expand All** or **Collapse All** in the dropdown menu.

### Editors (Holder)

Editors (Holder) contains editors to edit properties of model and view elements. It includes *Style Editor*, *Property Editor*, and *Documentation Editor*.

To show or hide *Editors*, press `Ctrl+6` or check (or uncheck) **View | Editors** in Menu Bar.

### Style Editor

*Style Editor* allows to edit styles of selected view elements.

### Property Editor

*Property Editor* allows to edit properties of selected model elements.

### Documentation Editor

*Documentation Editor* allows to edit documentation property of a selected model element.

### Toolbar

*Toolbar* shows tool buttons typically provided from default or installed third-party extensions.

To show or hide *Toolbar*, press `Ctrl+3` or check (or uncheck) **View | Toolbar** in Menu Bar.

### Bottom Panel

*Bottom Panel* is a panel shown below *Diagram Area* typically provided from default or installed third-party extensions including *Find Results*, *Diagram Thumbnails*, *Validation Results*, *Markdown Editor* and etc.

### Statusbar

To show or hide *Statusbar*, press `Ctrl+4` or check (or uncheck) **View | Statusbar** in Menu Bar.

## Dialogs

### Font Dialog

Font Dialog allows to edit font style, size and color for view elements.

![](/files/JzqnIB2hn2jOkfKY8ueQ)

### Color Dialog

Color Dialog allows to edit fill or line color for view elements.

![](/files/0vjYxhYF9TnIK39RkRYy)

### Element Picker Dialog

Element Picker Dialog allows to select an model element from all model elements shown in tree structure. Checking **Do not specify** means nothing selected.

![Element Picker](/files/jHyvBNQCBgaU2R63vznr)

### Element List Picker Dialog

Element List Picker Dialog allows to select an model element from a given list of model elements. Checking **Do not specify** means nothing selected.

![Element List Picker](/files/8LSzjxZYoafvCF1P9FXx)

### Element List Editor Dialog

Element List Editor Dialog is used when user need to select a list of model elements. It allows to add or remove elements from the list and also to modify the order of elements by move up and down.

![Element List Editor](/files/RDE9ffrMenVC1nbaZVfO)

### Print Dialog

Print Dialog allows to configure how to print.

* Print Rage : Select whether all diagrams to be printed or the current diagram to be printed.
* Page Layout : Select page layout is landscape or portait.
* Page Size : Select a proper page size&#x20;
* Show Diagram Name : Select whether diagram name to be printed or not.

![Print Dialog](/files/tXUG8oCL3NH0BElDPNeY)

### Preferences Dialog

Preference Dialog allows to set preferences. Left area shows preference schemas which contains a set of preference items. When you select a preference shema in the left area, then all preference items are shown. If you want to restore default settings, Select **Restore Default Settings** button in the most bottom.

![Preferences Dialog](/files/OV9063U59fP2xuKejgf3)

### Extension Manager Dialog

Extension Manager Dialog allows to install or uninstall extensions from Extension Registry. While **Registry** tab shows all available extensions, while **Installed** tab only shows the installed extension in local.

If you want to install an extension directly from Github URL, Select **Install From Url...** and enter the extension's url.

![Extension Manager](/files/AOn9LVbKQrk5gBrFLN9p)

## Tag Editor

Tag Editor is a convenient tool to manage Tags for an element. It shows all Attributes of the Stereotype assigned to the element, so it is easy to create Tags corresponding Stereotype's Attributes. It also shows all Tags which is not associated with a particular a Stereotype's Attribute. To open Tag Editor, select **Model | Tag Editor...** in Menu Bar or press key `Cmd+T` in macOS or `Ctrl+T` in Windows and Linux.

![Tag Editor](/files/qnBJL2KW6KFZXFJXJL7v)

## Quick Find

Quick Find allows to find a model elements, view element, or a diagram quickly. To popup Quick Find, select **View | Quick Find...** in Menu Bar or press key `Cmd+P` in macOS or `Ctrl+P` in Windows and Linux.

![Quick Find](/files/QuGglTsJPeNtVlxtoNd1)

## Command Palette

Command Palette allows to search and execute commands supported by default or installed extensions. To popup Command Palette, select **View | Command Palette...** in Menu Bar or press key `Cmd+Shift+P` in macOS or `Ctrl+Shift+P` in Windows and Linux.

![Command Palette](/files/ufF9rwZP623lMsHCZRbJ)


# CLI (Command Line Interface)

StarUML can be used as CLI (Command Line Interface) in terminal. With the CLI feature, you can generate various artifacts including source codes, documents (markdown, HTML, etc.), diagram images without launching StarUML GUI. Therefore, you can use CLI in your build script to automate   artifacts generation based on your software model.

## Creating Alias

### MacOS

It is useful to make an alias for StarUML application in terminal as below:

```
$ alias staruml='/Applications/StarUML.app/Contents/MacOS/StarUML'
```

### Windows

You can create an alias for StarUML application in PowerShell as below:

```
PS> Set-Alias -Name staruml -Value 'C:\Program Files\StarUML\StarUML.exe'
```

### Linux

In Linux, you don't need to create alias. If you installed StarUML successfully, you can run with `staruml` in Terminal without additional configuration.

## Commands

You can use four commands in CLI mode. If you omit the supported commands, StarUML will be launched as GUI mode.

You can see what kind of commands are supported by typing with help (`--help`) option.

```shell
$ staruml --help
$ staruml ejs --help    # help for ejs command
$ staruml image --help  # help for image command
$ staruml html --help   # help for html command
$ staruml pdf --help    # help for pdf command
$ staruml exec --help   # help for exec command
```

### ejs

The `ejs` command allow to generate textual artifacts from a user's software model file (.mdj). You can write your own templates with [EJS (Embedded JavaScript templating)](https://ejs.co/). You can find simple examples for EJS at <https://github.com/staruml/staruml-cli-examples>.

You can generate textual artifacts with the below CLI command:

```
$ staruml ejs <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-t`, `--template` : A template file (.ejs) to apply
* option `-o`, `--output` : output file name (default: `output.txt`)
* option `-s`, `--select` : query to select elements (default: `@Project`)

Here is an example to generate a HTML file.

```
$ staruml ejs myproject.mdj \
  -t class-list.ejs \
  -o class-list.html
```

You can generate multiple files with the select option as below:

```
$ staruml ejs myproject.mdj \
  -t java-class.ejs \
  -s @UMLClass \
  -o "out/<%=filenamify(element.name)%>.java"
```

This command selects all classes (UMLClass type) in `myproject.mdj` and then apply the `java-class.ejs` template for each class and save it as a `.java` file with the name of the class. You can get more information about the query expression to select elements at the [retrieving elements by query](/developing-extensions/accessing-elements#retrieving-elements-by-query) section.

Note that you can also use EJS template syntax in the output option. Sometimes the element name cannot be used as a filename (including special characters like `/`, `!`, `#`, `?`, etc.). You can use `filename()` function to convert a string to a legal filename string in output option like `-o "out/<%=filenamify(element.name)%>.java"`.

In EJS template string (in .ejs files or in output option), you can use below variables:

* `app` : The application object. (See [Application Context](/developing-extensions/getting-started#application-context))
* `element` : The element retrieved by the select option.
* `filenamify` : A function convert a string to a legal filename string. (See <https://github.com/sindresorhus/filenamify>)

### image

The `image` command allows you can generate image files for diagrams:

```
$ staruml image <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-f`, `--format` : image file format. One of `png`, `jpeg`, or `svg`. (default: `png`)
* option `-o`, `--output` : output file name.
* option `-s`, `--select` : query to select diagrams (default: `@Diagram`)

Here is an example to export all diagrams as PNG images in `out` folder:

```
$ staruml image myproject.mdj \
  -f png \
  -o "out/<%=filenamify(element.name)%>.png"
```

### html

The `html` command allows you can generate HTML docs for the model file:

```
$ staruml html <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-o`, `--output` : output path. (default: `./html-docs`)

Here is an example to generate HTML docs:

```
$ staruml html myproject.mdj
```

### pdf

The pdf command allows you can generate PDF document for diagrams:

```
$ staruml pdf <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-o`, `--output` : output file name. (default: `output.pdf`)
* option `-s`, `--select` : query to select diagrams (default: `@Diagram`)
* option `-z`, `--size` : page size. One of 4A0, 2A0, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, RA0, RA1, RA2, RA3, RA4, SRA0, SRA1, SRA2, SRA3, SRA4, Executive, Folio, Legal, Letter, Tabloid (default: `A4`).
* option `-l`, `--layout` : page layout. `landscape` or `portrait`. (default: `landscape`)
* option `-n`, `--showname` : Show diagram name on page top. `yes` or `no`. (default: `yes`)

Here is an example to generate PDF document (A3-sized portrait) including all diagrams:

```
$ staruml pdf myproject.mdj \
  -o doc.pdf \
  -z A3 \
  -l portrait
```

### exec

The exec command allows you can execute a command:

```
$ staruml exec <file> <options>
```

* `<file>` : A model file (.mdj) to load before executing a command
* option `-c`, `--command` : command id. (e.g. `application:main-log`)
* option `-a`, `--arg` : argument for the command

Here is an example to execute a command:

```
$ staruml exec myproject.mdj \
  --command application:main-log \
  --arg hello
```


# Validation Rules

**(UML001) Name expected.**

* Element should have a name.
* Applies to: `UMLModelElement`.
* Exceptions: `UMLParameter (only if direction === 'return')`, `UMLStructuralFeature (only if type is assigned)`, `UMLDirectedRelationship`, `UMLRelationshipEnd`, `UMLUndirectedRelationship`, `UMLAssociationClassLink`, `UMLRegion`, `UMLPseudostate`, `UMLFinalState`, `UMLControlNode`, `UMLEndpoint`, `UMLGate`, `UMLAction`, `UMLObjectNode`, `UMLImage`, `UMLConnector`.

**(UML002) Name is already defined.**

* If element has a name, then it should be unique in the namespace.
* Applies to: `UMLModelElement`.
* Exceptions: `UMLOperation`.

**(UML003) Conflict with inherited attributes.**

* Applies to: `UMLAttribute`.

**(UML004) Signature conflict.**

* Same signature is not allowed in a classifier.
* Applies To: `UMLOperation`.

**(UML006) Final and leaf element must not have child.**

* If `isFinalSpecifiction` or `isLeaf` is true, then it should not have child.
* Applies to: `UMLClassifier`.

**(UML007) Duplicated generalizations.**

* Do not make duplicated generalizations from the same element.
* Applies to: `UMLClassifier`.

**(UML008) Circular generalizations.**

* Do not generalize from one of the children.
* Applies to: `UMLClassifier`.

**(UML009) Duplicated realizations.**

* Applies to: `UMLClassifier`.

**(UML010) Duplicated role names of associated classifiers.**

* Applies to: `UMLClassifier`.

**(UML011) All attributes and operations of interface must be public.**

* All attributes and operations of an interface should have public visibility.
* Applies to: `UMLInterface`.

**(UML012) Aggregation must be one in an association.**

* Applies to: `UMLAssociation`.

**(UML013) Type of an artifact instance must be an artifact.**

* Applies to: `UMLArtifactInstance`.

**(UML014) Type of a component instance must be a component.**

* Applies to: `UMLComponentInstance`.

**(UML015) Type of a node instance must be a node.**

* Applies to: `UMLNodeInstance`.

**(UML016) A metaclass must have name defined in metamodel.**

* Applies to: `UMLMetaClass`

**(UML017) A stereotype must inherits from stereotype.**

* Applies To: `UMLStereotype`

**(UML018) A stereotype must contained by a profile.**

* Applies To: `UMLStereotype`

**(UML019) An actor only can associate with use cases, components, and classes.**

* Applies To: `UMLActor`

**(UML020) A use case cannot include use cases that directly or indirectly include it.**

* Applies To: `UMLUseCase`

**(UML021) An initial vertex can have at most one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'initial')`

**(UML022) The outgoing transition from an initial vertex must not have a trigger or guard.**

* Applies To: `UMLPseudostate (kind = 'initial')`

**(UML023) History vertices can have at most one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'deepHistory' | 'shallowHistory'`

**(UML024) A join vertex must have at least two incoming transitions and exactly one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'join')`

**(UML025) A fork vertex must have at least two outgoing transitions and exactly one incoming transition.**

* Applies To: `UMLPseudostate (kind = 'fork')`

**(UML026) A junction vertex must have at least one incoming and one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'junction')`

**(UML027) A choice vertex must have at least one incoming and one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'choice')`

**(UML028) Only submachine states can have connection point references.**

* Applies To: `UMLState`

**(UML029) A state is not allowed to have both a submachine and regions.**

* Applies To: `UMLState`

**(UML030) A region can have at most one initial vertex.**

* Applies To: `UMLRegion`

**(UML031) A region can have at most one deep history vertex.**

* Applies To: `UMLRegion`

**(UML032) A region can have at most one shallow history vertex.**

* Applies To: `UMLRegion`

**(UML033) A final state cannot have any outgoing transitions.**

* Applies To: `UMLFinalState`

**(UML034) A final state cannot have regions.**

* Applies To: `UMLFinalState`

**(UML035) A final state cannot reference a submachine.**

* Applies To: `UMLFinalState`

**(UML036) A final state has no entry behavior.**

* Applies To: `UMLFinalState`

**(UML037) A final state has no exit behavior.**

* Applies To: `UMLFinalState`

**(UML038) A final state has no state (doActivity) behavior.**

* Applies To: `UMLFinalState`

**(UML039) A fork segment must not have guards or triggers.**

* Applies To: `UMLTransition`

**(UML040) A join segment must not have guards or triggers.**

* Applies To: `UMLTransition`

**(UML041) A fork segment must always target a state.**

* Applies To: `UMLTransition`

**(UML042) A join segment must always originate from a state.**

* Applies To: `UMLTransition`

**(UML043) Transitions outgoing pseudostates may not have a trigger (except for those coming out of the initial pseudostate).**

* Applies To: `UMLTransition`

**(UML044) The classifier context of a state machine cannot be an interface.**

* Applies To: `UMLStateMachine`

**(UML045) A decision node has one or two incoming edges and at least one outgoing edge.**

\_ Applies To: `UMLDecisionNode`

**(UML046) A merge node has one outgoing edge.**

* Applies To: `UMLMergeNode`

**(UML047) The edges coming into and out of a merge node must be either all object flows or all control flows.**

* Applies To: `UMLMergeNode`

**(UML048) An initial node has no incoming edges.**

* Applies To: `UMLInitialNode`

**(UML049) Only control edges can have initial nodes as source.**

* Applies To: `UMLInitialNode`

**(UML050) A final node has no outgoing edges.**

* Applies To: `UMLFinalNode`

**(UML051) A fork node has one incoming edge.**

* Applies To: `UMLForkNode`

**(UML052) The edges coming into and out of a fork node must be either all object flows or all control flows.**

* Applies To: `UMLForkNode`

**(UML053) A join node has one outgoing edge.**

* Applies To: `UMLJoinNode`

**(UML054) The edges coming into and out of a join node must be either all object flows or all control flows.**

* Applies To: `UMLJoinNode`

**(UML055) All edges coming into or going out of object nodes must be object flow edges.**

* Applies To: `UMLObjectNode`

**(UML056) Control flows may not have object nodes at either end, except for object nodes with control type.**

* Applies To: `UMLControlFlow`

**(UML057) Object flows may not have actions at either end.**

* Applies To: `UMLObjectFlow`


# Keyboard Shortcuts

## Default Keymaps

| Command                                        | MacOS            | Windows           | Linux             |
| ---------------------------------------------- | ---------------- | ----------------- | ----------------- |
| File > New                                     | `Cmd+N`          | `Ctrl+N`          | `Ctrl+N`          |
| File > Open                                    | `Cmd+O`          | `Ctrl+O`          | `Ctrl+O`          |
| File > Save                                    | `Cmd+S`          | `Ctrl+S`          | `Ctrl+S`          |
| File > Save As                                 | `Cmd+Shift+S`    | `Ctrl+Shift+S`    | `Ctrl+Shift+S`    |
| File > Preferences                             | `Cmd+,`          | n/a               | n/a               |
| File > Quit                                    | `Cmd+Q`          | `Ctrl+Q`          | `Ctrl+Q`          |
| Edit > Undo                                    | `Cmd+Z`          | `Ctrl+Z`          | `Ctrl+Z`          |
| Edit > Redo                                    | `Cmd+Y`          | `Ctrl+Y`          | `Ctrl+Y`          |
| Edit > Cut                                     | `Cmd+X`          | `Ctrl+X`          | `Ctrl+X`          |
| Edit > Copy                                    | `Cmd+C`          | `Ctrl+C`          | `Ctrl+C`          |
| Edit > Copy Diagram As Image                   | `Cmd+Shift+C`    | `Ctrl+Shift+C`    | `Ctrl+Shift+C`    |
| Edit > Paste                                   | `Cmd+V`          | `Ctrl+V`          | `Ctrl+V`          |
| Edit > Delete                                  | `Delete`         | `Delete`          | `Delete`          |
| Edit > Delete from Model                       | `Cmd+Delete`     | `Ctrl+Delete`     | `Ctrl+Delete`     |
| Edit > Move Up                                 | `Cmd+Shift+Up`   | `Ctrl+Shift+Up`   | `Ctrl+Shift+Up`   |
| Edit > Move Down                               | `Cmd+Shift+Down` | `Ctrl+Shift+Down` | `Ctrl+Shift+Down` |
| Edit > Select All                              | `Cmd+A`          | `Ctrl+A`          | `Ctrl+A`          |
| Edit > Select In Explorer                      | `Cmd+E`          | `Ctrl+E`          | `Ctrl+E`          |
| Edit > Select In Diagram                       | `Cmd+D`          | `Ctrl+D`          | `Ctrl+D`          |
| Edit > Open Sub-Diagram                        | `Cmd+Shift+D`    | `Ctrl+Shift+D`    | `Ctrl+Shift+D`    |
| Format > Font                                  | `Cmd+Shift+F`    | `Ctrl+Shift+F`    | `Ctrl+Shift+F`    |
| Format > Fill Color                            | `Cmd+Shift+I`    | `Ctrl+Shift+I`    | `Ctrl+Shift+I`    |
| Format > Line Color                            | `Cmd+Shift+L`    | `Ctrl+Shift+L`    | `Ctrl+Shift+L`    |
| Format > Line Style > Rectilinear              | `Cmd+L`          | `Ctrl+L`          | `Ctrl+L`          |
| Format > Line Style > Oblique                  | `Cmd+B`          | `Ctrl+B`          | `Ctrl+B`          |
| Format > Line Style > RoundRect                | `Cmd+Option+L`   | `Ctrl+Alt+L`      | `Ctrl+Alt+L`      |
| Format > Line Style > Curve                    | `Cmd+Option+B`   | `Ctrl+Alt+B`      | `Ctrl+Alt+B`      |
| Format > Auto Resize                           | `Cmd+Shift+R`    | `Ctrl+Shift+R`    | `Ctrl+Shift+R`    |
| Format > Show Shadow                           | `Cmd+Shift+H`    | `Ctrl+Shift+H`    | `Ctrl+Shift+H`    |
| Format > Inherit Style                         | `Cmd+Shift+K`    | `Ctrl+Shift+K`    | `Ctrl+Shift+K`    |
| Format > Stereotype Display > None             | `Cmd+Shift+0`    | `Ctrl+Shift+0`    | `Ctrl+Shift+0`    |
| Format > Stereotype Display > Label            | `Cmd+Shift+1`    | `Ctrl+Shift+1`    | `Ctrl+Shift+1`    |
| Format > Stereotype Display > Decoration       | `Cmd+Shift+2`    | `Ctrl+Shift+2`    | `Ctrl+Shift+2`    |
| Format > Stereotype Display > Decoration Label | `Cmd+Shift+3`    | `Ctrl+Shift+3`    | `Ctrl+Shift+3`    |
| Format > Stereotype Display > Icon             | `Cmd+Shift+4`    | `Ctrl+Shift+4`    | `Ctrl+Shift+4`    |
| Format > Stereotype Display > Icon Label       | `Cmd+Shift+5`    | `Ctrl+Shift+5`    | `Ctrl+Shift+5`    |
| Format > Word Wrap                             | `Cmd+Shift+W`    | `Ctrl+Shift+W`    | `Ctrl+Shift+W`    |
| Format > Show Visibility                       | `Cmd+Shift+V`    | `Ctrl+Shift+V`    | `Ctrl+Shift+V`    |
| Format > Show Namespace                        | `Cmd+Shift+N`    | `Ctrl+Shift+N`    | `Ctrl+Shift+N`    |
| Format > Show Property                         | `Cmd+Shift+B`    | `Ctrl+Shift+B`    | `Ctrl+Shift+B`    |
| Format > Show Type                             | `Cmd+Shift+Y`    | `Ctrl+Shift+Y`    | `Ctrl+Shift+Y`    |
| Format > Show Multiplicity                     | `Cmd+Shift+M`    | `Ctrl+Shift+M`    | `Ctrl+Shift+M`    |
| Format > Show Operation Signature              | `Cmd+Shift+J`    | `Ctrl+Shift+J`    | `Ctrl+Shift+J`    |
| Format > Suppress Attributes                   | `Cmd+Shift+A`    | `Ctrl+Shift+A`    | `Ctrl+Shift+A`    |
| Format > Suppress Operations                   | `Cmd+Shift+O`    | `Ctrl+Shift+O`    | `Ctrl+Shift+O`    |
| Format > Suppress Receptions                   | `Cmd+Shift+E`    | `Ctrl+Shift+E`    | `Ctrl+Shift+E`    |
| Format > Suppress Literals                     | `Cmd+Shift+T`    | `Ctrl+Shift+T`    | `Ctrl+Shift+T`    |
| Format > Suppress Columns                      | `Cmd+Shift+U`    | `Ctrl+Shift+U`    | `Ctrl+Shift+U`    |
| Model > Find                                   | `Cmd+F`          | `Ctrl+F`          | `Ctrl+F`          |
| View > Quick Find                              | `Cmd+P`          | `Ctrl+P`          | `Ctrl+P`          |
| View > Command Palette...                      | `Cmd+Shift+P`    | `Ctrl+Shift+P`    | `Ctrl+Shift+P`    |
| View > Close Diagram                           | `F4`             | `F4`              | `F4`              |
| View > Close Other Diagrams                    | `Cmd+F4`         | `Ctrl+F4`         | `Ctrl+F4`         |
| View > Close All Diagrams                      | `Shift+F4`       | `Shift+F4`        | `Shift+F4`        |
| View > Next Diagram                            | `Cmd+Shift+]`    | `Ctrl+Shift+]`    | `Ctrl+Shift+]`    |
| View > Previous Diagram                        | `Cmd+Shift+[`    | `Ctrl+Shift+[`    | `Ctrl+Shift+[`    |
| View > Zoom In                                 | `Cmd++`          | `Ctrl++`          | `Ctrl++`          |
| View > Zoom Out                                | `Cmd+-`          | `Ctrl+-`          | `Ctrl+-`          |
| View > Actual Size                             | `Cmd+0`          | `Ctrl+0`          | `Ctrl+0`          |
| View > Fit To Window                           | `Cmd+9`          | `Ctrl+9`          | `Ctrl+Alt+1`      |
| View > Show Grid                               | `Cmd+G`          | `Ctrl+G`          | `Ctrl+G`          |
| View > Snap to Grid                            | `Cmd+Shift+G`    | `Ctrl+Shift+G`    | `Ctrl+Shift+G`    |
| View > Sidebar                                 | `Cmd+1`          | `Ctrl+1`          | `Ctrl+1`          |
| View > Navigator                               | `Cmd+2`          | `Ctrl+2`          | `Ctrl+2`          |
| View > Toolbar                                 | `Cmd+3`          | `Ctrl+3`          | `Ctrl+3`          |
| View > Statusbar                               | `Cmd+4`          | `Ctrl+4`          | `Ctrl+4`          |
| View > Toolbox                                 | `Cmd+5`          | `Ctrl+5`          | `Ctrl+5`          |
| View > Editors                                 | `Cmd+6`          | `Ctrl+6`          | `Ctrl+6`          |
| View > Diagram Thumbnails                      | `Cmd+Option+T`   | `Ctrl+Alt+T`      | `Ctrl+Alt+T`      |
| View > Markdown Documentation                  | `Cmd+Option+D`   | `Ctrl+Alt+D`      | `Ctrl+Alt+D`      |
| View > Minimap                                 | `Cmd+Option+M`   | `Ctrl+Alt+M`      | `Ctrl+Alt+M`      |
| View > Relationships                           | `Cmd+Option+R`   | `Ctrl+Alt+R`      | `Ctrl+Alt+R`      |
| Debug > Show DevTools                          | `Shift+Option+T` | `Shift+Alt+T`     | `Shift+Alt+T`     |
| Debug > Reload                                 | `Cmd+R`          | `Ctrl+R`          | `Ctrl+R`          |


# TouchBar (MacBook)

The TouchBar of Apple's MacBook is useful and convenient editing diagram. In TouchBar, there are some buttons frequently used as shown in the below capture.

![TouchBar (main)](/files/-MJa6kHCTiiaa17Lf5po)

When you select Line Style button in the TouchBar, a new TouchBar for changing line style is popup as below. By pressing Close button, you can go back to the main TouchBar.

![TouchBar (Line Style)](/files/-MJa6mvL1eEk62vbEkOS)

When you select Format button in the TouchBar, a new TouchBar for formatting is popup as below. All buttons are the toggle buttons and you can go back the the main TouchBar when you pressing Close button.

![TouchBar (Format)](/files/-MJa6qN4IpTuUPSuRvSy)


# Customization

## Custom Keymaps

If you want to make custom keymaps, you can create `keymap.json` at the user configuration path:

* `/Users/<user>/Library/Application Support/StarUML` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML` for Windows.
* `~/.config/StarUML` for Linux.

You can get how to edit the custom keymap file (`keymap.json`) at [Keymaps](/developing-extensions/keymaps).

Here is an example:

```javascript
{
  "cmdctrl-alt-1": null,
  "cmdctrl-alt-g": "view:show-grid"
}
```

The first entry is to release the `Ctrl+Alt+1` (`Cmd+Option+1` in MacOS) key binding and the second entry is to change key binding of **View > Show Grid** (Command ID is `view:show-grid`) to `Ctrl+Alt+G` (`Cmd+Option+G` in MacOS).

If you want to know all command IDs, enter the following expression at **Console** (Debug > Show DevTools > Console tab).

```javascript
Object.keys(app.commands.commands)
```

## Custom Fonts

If you want to use custom fonts, you can add a font folder in the custom fonts folder:

* `/Users/<user>/Library/Application Support/StarUML/fonts` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML\fonts` for Windows.
* `~/.config/StarUML/fonts` for Linux.

1. Create a font folder (e.g. `my-font`) at the custom fonts folder.
2. Place a font description file (`font.json`) and the TrueType font files `.ttf` in the font folder.

The font description file looks as below:

```javascript
[
  {
    "name"       : "MyFont",
    "regular"    : "MyFont-Regular.ttf",
    "italic"     : "MyFont-Italic.ttf",
    "bold"       : "MyFont-Bold.ttf",
    "boldItalic" : "MyFont-BoldItalic.ttf"
  }
]
```

StarUML should be restarted to recognize the added custom fonts.


# Mermaid Support

## Generate Diagram by Mermaid

[Mermaid](https://mermaid.js.org/) is a diagramming tool that renders Markdown-inspired text definitions into visual diagrams. It is a powerful way to create and visualize various types of diagrams, including flowcharts, sequence diagrams, class diagrams, and more, directly from text.

To  generate diagrams by Mermaid:

1. Select **Tools > Generate Diagram by Mermaid** menu.
2. Enter mermaid code and click **Generate** button.
3. Select a package where the generated diagram and elements to be contained.

## Supported Mermaid Diagrams

StarUML support the following Mermaid diagrams:

* Class Diagram
* Sequence Diagram
* State Diagram
* Flowchart
* Entity Relationship Diagram
* Requirement Diagram
* Mindmap

Please refer to the [official documentation](https://mermaid.js.org/intro/) for the specific Mermaid syntax.

{% hint style="warning" %}
There may be differences in style, layout, etc. between the diagram generated in StarUML using Mermaid syntax and the actual rendering of Mermaid.
{% endhint %}

### Class Diagram

You can create a class diagram with Mermaid. Keep in mind that the class diagram syntax in Mermaid is different from the UML specification. For example, an attribute is written as `age: int` in UML, but as `int age` in Mermaid. For more details, refer to the official Mermaid documentation.

Here is an example code for class diagram.

```mermaid
classDiagram
    note "From Duck till Zebra"
    Animal <|-- Duck
    note for Duck "can fly\ncan swim\ncan dive\ncan help in debugging"
    Animal <|-- Fish
    Animal <|-- Zebra
    Animal : +int age
    Animal : +String gender
    Animal: +isMammal()
    Animal: +mate()
    class Duck{
        +String beakColor
        +swim()
        +quack()
    }
    class Fish{
        -int sizeInFeet
        -canEat()
    }
    class Zebra{
        +bool is_wild
        +run()
    }
```

{% hint style="warning" %}
Mermaid for StarUML do not support followings in class diagram:

* Namespaces
* Styling and classes
* Markdown formatting
* Links
* Interactions
  {% endhint %}

### Sequence Diagram

A sequence diagram illustrates how objects interact in a particular scenario of a use case. It shows the sequence of messages exchanged between the objects to perform a specific function. Here is an example code for sequence diagram.

```mermaid
sequenceDiagram
    Alice->>Bob: Hello Bob, how are you ?
    Bob->>Alice: Fine, thank you. And you?
    create participant Carl
    Alice->>Carl: Hi Carl!
    create actor D as Donald
    Carl->>D: Hi!
    destroy Carl
    Alice-xCarl: We are too many
    Bob->>Alice: I agree
```

Message types that do not exist in the UML specification are not supported.

* Lines without arrowheads
* Lines with a cross at the end
* Lines with bidirectional arrowheads
* Dotted lines with arrowheads treated as `asyncSignal` type.&#x20;

In StarUML, activation cannot be controlled on a per-message basis. Therefore, if even a single message has an activation, the activation is shown throughout the entire diagram.

{% hint style="warning" %}
Mermaid for StarUML do not support followings in sequence diagram:

* Group/Box
* Background color
* Styles and classes
* Actor menu
  {% endhint %}

### State Diagram

A state diagram is a graphical representation of a system that shows its states, transitions, and events. Each state depicts a unique situation in the system, while transitions indicate how the system moves from one state to another based on events or conditions. Here is an example code for state diagram.

```mermaid
stateDiagram-v2
    [*] --> Still
    Still --> [*]

    Still --> Moving
    Moving --> Still
    Moving --> Crash
    Crash --> [*]
```

{% hint style="warning" %}
Mermaid for StarUML do not support followings in state diagram:

* Composite state
* Concurrency
* Styles and classes
* Markdown formatting
  {% endhint %}

### Flowchart

A flowchart is a visual representation of a process, system, or algorithm. It uses symbols like arrows, rectangles, ovals, and diamonds to depict the flow of steps, decisions, and information, allowing for easy understanding and communication of complex processes. Here is an example code for flowchart.

```mermaid
flowchart TD
    A[Start] --> B{Is it?}
    B -->|Yes| C[OK]
    C --> D[Rethink]
    D --> B
    B ---->|No| E[End]    
```

{% hint style="warning" %}
Mermaid for StarUML do not support followings in flowchart:

* Some node shapes (asymmetric, parallelogram alt, trapezoid, and double circle)
* Expanded node shapes and special shapes
* Link types and arrow types except solid arrows (means flow)
* Animation, interaction, style, classes and icons
* Markdown formatting
* Subgraph
  {% endhint %}

### Entity Relationship Diagram

An Entity Relationship Diagram (ERD) is a graphical representation of entities and their relationships in a database. It is a critical tool in database design that helps visualize how data is structured and how different entities interact within the system. Here is an example code for entity relationship diagram.

```mermaid
erDiagram
    CUSTOMER ||--o{ ORDER : places
    CUSTOMER {
        string name
        string custNumber
        string sector
    }
    ORDER ||--|{ LINE-ITEM : contains
    ORDER {
        int orderNumber
        string deliveryAddress
    }
    LINE-ITEM {
        string productCode
        int quantity
        float pricePerUnit
    }
```

{% hint style="warning" %}
Mermaid for StarUML do not support followings in entity relationship diagram:

* Markdown formatting
* Styling and classes
  {% endhint %}

### Requirement Diagram

A requirement diagram is a visual representation used to capture, categorize, and manage requirements in a system or project. Primarily used in systems engineering and software engineering, it helps stakeholders understand requirement relationships and hierarchies. Here is an example code for requirement diagram.

```mermaid
requirementDiagram
    requirement test_req {
        id: 1
        text: the test text.
        risk: high
        verifymethod: test
    }
    
    element test_entity {
        type: simulation
    }
    
    test_entity - satisfies -> test_req
```

{% hint style="warning" %}
Mermaid for StarUML do not support followings in requirement diagram:

* Markdown formatting
* Styles and classes
  {% endhint %}

### Mindmap

A mindmap is a visual tool used for organizing information hierarchically. It starts with a central idea and branches out into related subtopics, helping to generate, organize, and visualize ideas or concepts. Mindmaps are useful for brainstorming and planning as they encourage a free flow of ideas. Here is an example code for mindmap.

```mermaid
mindmap
  root((mindmap))
    Origins
      Long history
      Popularisation
        British popular psychology author Tony Buzan
    Research
      On effectiveness and features
      On Automatic creation
        Uses
            Creative techniques
            Strategic planning
            Argument mapping
    Tools
      Pen and paper
      Mermaid
```

{% hint style="warning" %}
Mermaid for StarUML do not support followings in mindmap:

* Node shapes
* Icon and classes
* Markdown formatting
  {% endhint %}


# AI integration via MCP

StarUML supports integration with various AI services (such as Claude Desktop, Cursor, etc.) through the MCP server. The StarUML MCP Server is open-sourced in the GitHub repository. Installation and usage instructions are described in detail in the repository.

{% hint style="info" %}
StarUML MCP Server

<https://github.com/staruml/staruml-mcp-server>
{% endhint %}

<figure><img src="/files/qBH8RrH8Of6MUSLJv0QU" alt=""><figcaption></figcaption></figure>

## Configure API Server

The MCP Server communicates with StarUML's API Server using the HTTP protocol. You can disable the API Server or change the communication port.

If you want to configure API server, you can edit `settings.json` at the user configuration path:

* `/Users/<user>/Library/Application Support/StarUML` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML` for Windows.
* `~/.config/StarUML` for Linux.

To control whether the API Server runs, modify the `apiServer` field. To change the API Server port number, edit the `apiServerPort` field as below. Default port number is `58321`.

```json
{
  ...
  "apiServer": true,
  "apiServerPort": 58321
}
```


# Troubleshooting

### Installation

#### Clean uninstall

If the application does not work, perform a clean uninstall and reinstall it.

**Please make sure to delete the folder below for a clean uninstall.**

* MacOS : `/Users/<user>/Library/Application Support/StarUML` (Recommend to use [AppCleaner](https://freemacsoft.net/appcleaner/))
* Windows : `C:\Users\<user>\AppData\Roaming\StarUML`.
* Linux : `~/.config/StarUML`.

#### How to download previous versions?

You can download all the versions of StarUML from the [Archive page](https://staruml.io/archive/).

### License management

#### License is not activated

When the license cannot be activated, please check the following:

1. Check that the versions of the license and the installed StarUML are the same. (Check the version of the license in the [License Manager](https://staruml.io/license-manager), and the version of StarUML in About Dialog. You can download previous versions of StarUML from the [Archive page](https://staruml.io/archive/))
2. Check your internet connection. (If there is no internet connection or external access is restricted due to company security policies, please try offline activation)
3. Check that you have entered the license key correctly.
4. Try to deactivate license for unused devices.
5. Try [offline activation](#how-to-activate-license-in-offline).

If you tried the above methods but still failed, please contact us with the information below attached.

* OS version
* StarUML version
* Your license key
* Your Device ID (Select **Help > License Activation** menu and click **Copy Device ID**)
* Dump (or screenshot) errors in console (Select **Debug > Show Dev Tools** menu and click **Console** tab)

#### How to deactivate license

To deactivate in the application:

1. Select **Help > License Activation** menu
2. Click **Deactivate** button.

To deactivate in License Manager:

1. Login to the [License Manager](https://staruml.io/license-manager) with your email (The email address entered when purchasing the license).
2. Select **Devices** menu on the top.
3. Click **Deactivate** button on a particular device, or click **Deactivate all devices** button to deactivate all devices.

#### How to activate license in offline

1. Login to the [License Manager](https://staruml.io/license-manager) with your email (The email address entered when purchasing the license).
2. Select **Device** menu on the top.
3. Select a license. The **offline activation** guide will then appear in the area at the bottom of the page.
4. Follow the **offline activation** guide.

#### How to deactivate license in offline

1. Delete `activation.key` file from the below folder:
   * MacOS : `/Users/<user>/Library/Application Support/StarUML`
   * Windows : `C:\Users\<user>\AppData\Roaming\StarUML`.
   * Linux : `~/.config/StarUML`.
2. [Deactivate in License Manager](#how-to-deactivate-license).

#### I lost my license key

You can log in to the [License Manager](https://staruml.io/license-manager) with your email to find all your license keys.

### Reporting bugs <a href="#reporting-bugs" id="reporting-bugs"></a>

To report bugs, please contact us with the information below attached.

* OS version
* StarUML version
* Video recording of the issue (or, detailed steps to reproduce the issue)
* Screen capture of errors in console (Select **Debug > Show DevTools** menu and click **Console** tab)
* Your license key (if license-related issue)


# Class Diagram

![Class Diagram](/files/-MICXxhUZPR6Q1UWMdUN)

## Create Class Diagram

To create a Class Diagram:

1. First select an element where a new Class Diagram to be contained as a child.
2. Select **Model | Add Diagram | Class Diagram** in the Menu Bar or select **Add Diagram | Class Diagram** in Context Menu.

> **See also**
>
> [UML Class Diagram](http://www.uml-diagrams.org/class-diagrams-overview.html) - For more information about UML Class Diagram.

## Model Element

Model Element is an abstract element of all UML model elements.

You can use **QuickEdit** for Model Element by double-click or press `Enter` on a selected model element.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.

## Classifier

Classifier is an abstract element of:

* [Class](/working-with-uml-diagrams/class-diagram#class)
* [Interface](/working-with-uml-diagrams/class-diagram#interface)
* [Signal](/working-with-uml-diagrams/class-diagram#signal)
* [DataType](/working-with-uml-diagrams/class-diagram#datatype)
* [PrimitiveType](/working-with-uml-diagrams/class-diagram#primitivetype)
* [Enumeration](/working-with-uml-diagrams/class-diagram#enumeration)
* [Component](/working-with-uml-diagrams/component-diagram#component)
* [Artifact](/working-with-uml-diagrams/component-diagram#artifact)

You can use **QuickEdit** for Classifier by double-click or press `Enter` on a selected classifier.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.

## Class

To create a Class:

1. Select **Class** in **Toolbox**.
2. Drag on the diagram as the size of Class.

To create a Class (model element only) by Menu:

1. Select an Element where a new Class to be contained.
2. Select **Model | Add | Class** in Menu Bar or **Add | Class** in Context Menu.

You can use **QuickEdit** for Class by double-click or press `Enter` on a selected Class.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Template Parameter** : Add a template parameter.
* **Add Reception** : Add a reception.
* **Add Sub-Class** : Add a sub-class.
* **Add Super-Class** : Add a super class.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.
* **Add Associated Class** : Add an associated class.
* **Add Aggregated Class** : Add an aggregated class.
* **Add Composited Class** : Add a composited class.
* **Add Port** : Add a port.
* **Add Part** : Add a part.

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To suppress Receptions, see [Suppress Receptions](/user-guide/formatting-diagram#suppress-receptions).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Attribute

To add an Attribute:

1. Select a Classifier.
2. Select **Model | Add | Attribute** in Menu Bar or **Add | Attribute** in Context Menu.

You can use **QuickEdit** for Attribute by double-click or press `Enter` on a selected Attribute.

* **Attribute Expression** : Edit Attribute expression.

  *Syntax of Attribute Expression*

  ```
  attribute ::= [ '<<' stereotype `>>` ] [ visibility ] name [':' type ] [ '[' multiplicity ']' ] [ '=' defaut-value ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  type ::= (identifier)
  multiplicity ::= multiplicity-bound [ '..' multiplicity-bound ]
  multiplicity-bound ::= (number) | '*'
  default-value ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more attribute in the below.
* **Delete** (`Ctrl+Delete`) : Delete the attribute
* **Move Up** (`Ctrl+Up`) : Move the attribute up.
* **Move Down** (`Ctrl+Down`) : Move the attribute down.

## Operation

To add an Operation:

1. Select a Classifier.
2. Select **Model | Add | Operation** in Menu Bar or **Add | Operation** in Context Menu.

You can use **QuickEdit** for Operation by double-click or press `Enter` on a selected Operation.

* **Operation Expression** : Edit Operation expression.

  *Syntax of Operation Expression*

  ```
  operation ::= [ '<<' stereotype `>>` ] [ visibility ] name [ '(' parameter-list ')' ] [ ':' return-type ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  parameter-list ::= parameter [ ',' parameter ]*
  parameter ::= (identifier)
  return-type ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more operation in the below.
* **Delete** (`Ctrl+Delete`) : Delete the operation
* **Move Up** (`Ctrl+Up`) : Move the operation up.
* **Move Down** (`Ctrl+Down`) : Move the operation down.

To add a Parameter, see [Parameter](/working-with-uml-diagrams/class-diagram#parameter).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Parameter

To add a Parameter:

1. Select an Operation.
2. Select **Model | Add | Parameter** in Menu Bar or **Add | Parameter** in Context Menu.

## Template Parameter

To add a Template Parameter:

1. Select an Element.
2. Select **Model | Add | Template Parameter** in Menu Bar or **Add | Template Parameter** in Context Menu.

You can use **QuickEdit** for Template Parameter by double-click or press `Enter` on a selected Template Parameter.

* **Template Parameter Expression** : Edit Template Parameter expression.

  *Syntax of Template Parameter Expression*

  ```
  template-parameter ::= [ '<<' stereotype `>>` ] [ visibility ] name [':' type ] [ '=' defaut-value ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  type ::= (identifier)
  default-value ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more template parameter in the below.
* **Delete** (`Ctrl+Delete`) : Delete the template parameter.
* **Move Up** (`Ctrl+Up`) : Move the template parameter up.
* **Move Down** (`Ctrl+Down`) : Move the template parameter down.

## Template Parameter Substitution

To add a Template Parameter Substituion:

1. Select a Template Binding element.
2. Select **Model | Add | Template Parameter Substitution** in Menu Bar or **Add | Template Parameter Substitution** in Context Menu.

Each **Template Parameter Substitution** should have `formal` property assigned to a **Template Parameter** of the template element and `actual` property assigned to the actual value for the template parameter.

## Interface

To create an Interface:

1. Select **Interface** in **Toolbox**.
2. Drag on the diagram as the size of Interface.

To create an Interface (model element only) by Menu:

1. Select an Element where a new Interface to be contained.
2. Select **Model | Add | Interface** in Menu Bar or **Add | Interface** in Context Menu.

You can use **QuickEdit** for Interface by double-click or press `Enter` on a selected Interface.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.
* **Add Sub-Interface** : Add a sub-interface.
* **Add Super-Interface** : Add a super interface.
* **Add Realizing Class** : Add an realizing class.

To show an Interface as Lollipop notation, Interface should be realized (See [Interface Realization](/working-with-uml-diagrams/class-diagram#interface-realization)) and then change Stereotype Display to Icon or Icon with Label (See [Stereotype Display](/user-guide/formatting-diagram#stereotype-display)).

To show an Interface as Socket notation, Interface should have dependants (See [Dependency](/working-with-uml-diagrams/class-diagram#dependency)) and then change Stereotype Display to Icon or Icon with Label (See [Stereotype Display](/user-guide/formatting-diagram#stereotype-display)).

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To suppress Receptions, see [Suppress Receptions](/user-guide/formatting-diagram#suppress-receptions).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Signal

To create a Signal:

1. Select **Signal** in **Toolbox**.
2. Drag on the diagram as the size of Signal.

To create a Signal (model element only) by Menu:

1. Select an Element where a new Signal to be contained.
2. Select **Model | Add | Signal** in Menu Bar or **Add | Signal** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/working-with-uml-diagrams/class-diagram#classifier)).

## DataType

To create a DataType:

1. Select **DataType** in **Toolbox**.
2. Drag on the diagram as the size of DataType.

To create a DataType (model element only) by Menu:

1. Select an Element where a new DataType to be contained.
2. Select **Model | Add | DataType** in Menu Bar or **Add | DataType** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/working-with-uml-diagrams/class-diagram#classifier)).

## PrimitiveType

To create a PrimitiveType:

1. Select **PrimitiveType** in **Toolbox**.
2. Drag on the diagram as the size of PrimitiveType.

To create a PrimitiveType (model element only) by Menu:

1. Select an Element where a new PrimitiveType to be contained.
2. Select **Model | Add | PrimitiveType** in Menu Bar or **Add | PrimitiveType** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/working-with-uml-diagrams/class-diagram#classifier)).

## Enumeration

To create an Enumeration:

1. Select **Enumeration** in **Toolbox**.
2. Drag on the diagram as the size of Enumeration.

To create an Enumeration (model element only) by Menu:

1. Select an Element where a new Enumeration to be contained.
2. Select **Model | Add | Enumeration** in Menu Bar or **Add | Enumeration** in Context Menu.

You can use **QuickEdit** for Enumeration by double-click or press `Enter` on a selected Enumeration.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Literal** (`Ctrl+Enter`) : Add an enumeration literal.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.

To suppress Literals, see see [Suppress Literals](/user-guide/formatting-diagram#suppress-literals).

## Enumeration Literal

To add an Enumeration Literal:

1. Select a Classifier.
2. Select **Model | Add | Enumeration Literal** in Menu Bar or **Add | Enumeration Literal** in Context Menu.

You can use **QuickEdit** for Enumeration Literal by double-click or press `Enter` on a selected Enumeration Literal.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more literal in the below.
* **Delete** (`Ctrl+Delete`) : Delete the literal
* **Move Up** (`Ctrl+Up`) : Move the literal up.
* **Move Down** (`Ctrl+Down`) : Move the literal down.

## Relationship

Relationship is an abstract element representing a relationship between UML elements.

Subclasses of Relationship are:

* [Generalization](/working-with-uml-diagrams/class-diagram#generalization)
* [Association](/working-with-uml-diagrams/class-diagram#association)
* [Aggregation](/working-with-uml-diagrams/class-diagram#aggregation)
* [Composition](/working-with-uml-diagrams/class-diagram#composition)
* [Dependency](/working-with-uml-diagrams/class-diagram#dependency)
* [Interface Realization](/working-with-uml-diagrams/class-diagram#interface-realization)
* [Component Realization](/working-with-uml-diagrams/component-diagram#component-realization)
* [Include](/working-with-uml-diagrams/use-case-diagram#include)
* [Exclude](/working-with-uml-diagrams/use-case-diagram#exclude)

![QuickEdits for Relationship](/files/75ZlIUSeTA7XC3AcJ0pr)

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.

## Generalization

To create a Generalization:

1. Select **Generalization** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Association

To create an Association (or Directed Association):

1. Select **Association** (or **Directed Association**) in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for Association End by double-click at the end side of an Association.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Navigability** : Change navigable property.
* **Aggregation Kind** : Change aggregationKind property.
* **Multiplicity** : Change multiplicity property.
* **Add Qualifier** : Add a qualifier (attribute) to the AssociationEnd.

### Order of Ends

You can show an arrow representing order of ends. If you want to show arrow from end1 to end2, then select `forward` in **QuickEdit**. Or, you want to show arrow from end2 to end1, then select `backward`. You can also hide the arrow by selecting `hide`.

![Order of Ends](/files/9AxFUAwp6GmUukdEr4oH)

### Navigability

You can set `navigable` property of AssociationEnd to one of following:

* `unspecified`
* `navigable`
* `notNavigable`

![Navigability of AssociationEnd](/files/DltueB8IFWawwtc0CKdo)

### N-ary Association

{% hint style="warning" %}
The N-ary association here is different from the UML specification and is not a semantically correct modeling method. Please refer to the UML specification for details.
{% endhint %}

If you want to create N-ary association, you need to create N-ary association node first.

To create an N-ary Association:

1. Select **N-ary Association Node** in Toolbox (Class Advanced)
2. Drag on the diagram as the size of **N-ary Association Node** (diamond shape).
3. Create **Associations** between Classifiers and the **N-ary Association** Node.

![N-ary Association](/files/YX0UIIGhwIMJ9X4KFULs)

### Ownership

To show ownership dot on AssociationEnd, assign `ownerAttribute` of AssociationEnd.

![AssociationEnd's ownership notation](/files/BawJEPYN1XL0kVVqVxWy)

## Aggregation

To create an Aggregation:

1. Select **Aggregation** in **Toolbox**.
2. Drag from an element (to be a part) and drop on another element (to be whole).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for AssociationEnd by double-click at the end side of an Association (See [Association](/working-with-uml-diagrams/class-diagram#association)).

> **Note**
>
> Aggregation is an association whose `aggregation` property is `shared`.

## Composition

To create a Composition:

1. Select **Composition** in **Toolbox**.
2. Drag from an element (to be a part) and drop on another element (to be whole).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for AssociationEnd by double-click at the end side of an Association (See [Association](/working-with-uml-diagrams/class-diagram#association)).

> **Note**
>
> Composition is an association whose `aggregation` property is `composite`.

## Dependency

To create an Dependency:

1. Select **Dependency** in **Toolbox**.
2. Drag from an element (client) and drop on another element (supplier).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Interface Realization

To create an Interface Realization:

1. Select **Interface Realization** in **Toolbox**.
2. Drag from an element (realizing) and drop on an interface (to be realized).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Association Class

To create an Association Class by linking two Classifiers:

1. Select **Association Class** in **Toolbox**.
2. Drag from an element and drop on another element.
3. An Association and a Class connected to the association will be created.

To create an Association Class by linking Association and Class:

1. Select **Association Class** in **Toolbox**.
2. Drag from an Association (or Class) and drop on a Class (or Association).
3. The Class will be connected to the Association.

## Template Binding

To create a Template Binding:

1. Select **Template Binding** in **Toolbox**.
2. Drag from a bound element and drop on a template element.
3. If required, create [Template Parameter Substitution](/working-with-uml-diagrams/class-diagram#template-parameter-substitution).

You can use **QuickEdit** for Template Binding by double-click or press `Enter`.

* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Template Parameter** : Add a template parameter substitution.

## Frame

To create a Frame view of a particular model element:

1. Select **Frame** in **Toolbox**.
2. Drag on the diagram as the size of Frame.
3. Select a model element which the Frame represents in **Element Picker Dialog**

You can show model element type in Frame by checking **Format > Show Type** menu item.

You can show model element's namespace in Frame by checking **Format > Show Namespace** menu item.

You can show diagram name in Frame by checking **Format > Show Diagram Name** menu item.

## Tag

To add a Tag of an element:

1. Select an element to add a Tag.
2. Select **Model | Add | Tag** in Menu Bar or **Add | Tag** in Context Menu.

You can select one of tag kinds: **string**, **reference**, **boolean**, **number,** or **enum**. The `value` property corresponds to **string** kind. The `reference` property corresponds to **reference** kind. The `checked` property corresponds to **boolean** kind. The `number` property corresponds to **number** kind. The `value` and `options` property corresponds to **enum** type.

The `options` property should contains items separated by new line character and the `value` property should have one of the item specified in the `options` property.

The Tags can be shown in views by checking **Format** > **Show Property** menu item. If you don't want to be shown, check `hidden` property.

You can manage Tags conveniently in [Tag Editor](/user-guide/user-interface#tag-editor) with relationships of Stereotype's Attributes.

## Constraint

To add a Constraint of an element:

1. Select an element to add a Constraint.
2. Select **Model | Add | Constraint** in Menu Bar or **Add | Constraint** in Context Menu.

You can create a Constraint view on a diagram by drag and drop from Model Explorer.


# Package Diagram

![Package Diagram](/files/-MIC_13ZHBO7BBMUEZs2)

## Create Package Diagram

To create a Package Diagram:

1. Select first an element where a new Package Diagram to be contained as a child.
2. Select **Model | Add Diagram | Package Diagram** in Menu Bar or select **Add Diagram | Package Diagram** in Context Menu.

> **See also**
>
> [UML Package Diagram](http://www.uml-diagrams.org/package-diagrams-overview.html) - For more information about UML Package Diagram.

## Package

To create a Package on a diagram:

1. Select **Package** in **Toolbox**.
2. Drag on the diagram as the size of Package.

To create a Package (model element only) by Menu:

1. Select an Element where a new Package to be contained.
2. Select **Model | Add | Package** in Menu Bar or **Add | Package** in Context Menu.

You can use **QuickEdit** for Package by double-click or press `Enter` on a selected Package.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Sub-Package** : Add a sub-package.
* **Add Dependant Package** : Add a dependant package.
* **Add Depending Package** : Add a depending package.

## Model

To create a Model on a diagram:

1. Select **Model** in **Toolbox**.
2. Drag on the diagram as the size of Model.

To create a Model (model element only) by Menu:

1. Select an Element where a new Model to be contained.
2. Select **Model | Add | Model** in Menu Bar or **Add | Model** in Context Menu.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Subsystem

To create a Subsystem on a diagram:

1. Select **Subsystem** in **Toolbox**.
2. Drag on the diagram as the size of Subsystem.

To create a Subsystem (model element only) by Menu:

1. Select an Element where a new Subsystem to be contained.
2. Select **Model | Add | Subsystem** in Menu Bar or **Add | Subsystem** in Context Menu.

You can use **QuickEdit** for Subsystem by double-click or press `Enter` on a selected Subsystem.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.

## Containment

To make an Containment relation:

1. Select **Containment** in **Toolbox**.
2. Drag from an element (to be contained) and drop on a container element.

> **Note**
>
> There is no Containment model element. The Containment view element only show the containment relationship between two elements. (Contained elements are shown as children in **Model Explorer**)


# Composite Structure Diagram

![Composite Structure Diagram (from uml-diagram.org)](/files/Fc9MC8NJpoNifBqKyMYz)

## Create Composite Structure Diagram

To create a Composite Structure Diagram:

1. Select first an element where a new Composite Structure Diagram to be contained as a child.
2. Select **Model | Add Diagram | Composite Structure Diagram** in Menu Bar or select **Add Diagram | Composite Structure Diagram** in Context Menu.

> **See also**
>
> [UML Composite Structure Diagram](http://www.uml-diagrams.org/composite-structure-diagrams.html) For more information about UML Composite Structure Diagram.

## Collaboration

To create a Collaboration:

1. Select **Collaboration** in **Toolbox**.
2. Drag on the diagram as the size of Collaboration.

To create a Collaboration (model element only) by Menu:

1. Select an Element where a new Collaboration to be contained.
2. Select **Model | Add | Collaboration** in Menu Bar or **Add | Collaboration** in Context Menu.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Port

To create a Port:

1. Select **Port** in **Toolbox**.
2. Click on the element (e.g. Class) where Port to be contained.

To create a Port (model element only) by Menu:

1. Select an Element where a new Port to be contained.
2. Select **Model | Add | Port** in Menu Bar or **Add | Port** in Context Menu.

You can use **QuickEdit** for Port by double-click or press `Enter` on a selected Port.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Type** : Select a Classifier and assign it to type property.
* **Create Type** : Create a Class and assign it to type property.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.
* **Add Connected Part** : Add a connected part.

## Part

To create a Part:

1. Select **Part** in **Toolbox**.
2. Click on the element (e.g. Class) where Part to be contained.

You can use **QuickEdit** for Port (See [Port](/working-with-uml-diagrams/composite-structure-diagram#port)).

> **Note**
>
> Actually, Part is equivalent to Attribute but represented differently on diagrams.

## Connector

To create an Connector:

1. Select **Connector** in **Toolbox**.
2. Drag from an element (e.g. Port) and drop on another element (e.g. Part).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Collaboration Use

To create a Collaboration Use:

1. Select **Collaboration Use** in **Toolbox**.
2. Drag on the diagram as the size of Collaboration Use.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Role Binding

To create an Role Binding:

1. Select **Role Binding** in **Toolbox**.
2. Drag from a Collaboration Use and drop on an element (e.g. Part).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Object Diagram

![Object Diagram (from uml-diagrams.org)](/files/L0zfqGzbYwb13NKl9I9e)

## Create Object Diagram

To create a Object Diagram:

1. Select first an element where a new Object Diagram to be contained as a child.
2. Select **Model | Add Diagram | Object Diagram** in Menu Bar or select **Add Diagram | Object Diagram** in Context Menu.

> **See also**
>
> [UML Object Diagram](http://www.uml-diagrams.org/class-diagrams-overview.html#object-diagram) - For more information about UML Object Diagram.

## Object

To create a Object:

1. Select **Object** in **Toolbox**.
2. Drag on the diagram as the size of Object.

You can use **QuickEdit** for Object by double-click or press `Enter` on a selected Object.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Slot** (`Ctrl+Enter`) : Add a slot.
* **Add Linked Object** : Add a linked object.

## Slot

To add an Slot:

1. Select an Instance.
2. Select **Model | Add | Slot** in Menu Bar or **Add | Slot** in Context Menu.

You can use **QuickEdit** for Slot by double-click or press `Enter` on a selected Slot.

* **Slot Expression** : Edit Slot expression.

  *Syntax of Slot Expression*

  ```
  slot ::= [ '<<' stereotype `>>` ] [ visibility ] name [':' type ] [ '=' value ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  type ::= (identifier)
  value ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more slot in the below.
* **Delete** (`Ctrl+Delete`) : Delete the slot
* **Move Up** (`Ctrl+Up`) : Move the slot up.
* **Move Down** (`Ctrl+Down`) : Move the slot down.

## Artifact Instance

To create a Artifact Instance:

1. Select **Artifact Instance** in **Toolbox**.
2. Drag on the diagram as the size of Artifact Instance.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Component Instance

To create a Component Instance:

1. Select **Component Instance** in **Toolbox**.
2. Drag on the diagram as the size of Component Instance.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Node Instance

To create a Node Instance:

1. Select **Node Instance** in **Toolbox**.
2. Drag on the diagram as the size of Node Instance.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Link

To create an Link (or Directed Link):

1. Select **Link** (or **Directed Link**) in **Toolbox**.
2. Drag from an instance and drop on another instance.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for LinkEnd by double-click at the end side of an Link.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Navigability** : Change navigability property.
* **Aggregation Kind** : Change aggregationKind property.
* **Multiplicity** : Change multiplicity property.

## Link Object

To create a Link Object (instance of Association Class) by linking two Instances:

1. Select **Link Object** in **Toolbox**.
2. Drag from an element and drop on another element.
3. A Link Object is created between the instances.

To create a Link Object by linking Link and Object:

1. Select **Link Object** in **Toolbox**.
2. Drag from a Link (or Object) and drop on an Object (or Link).
3. The Object will be connected to the Link.


# Component Diagram

![Component Diagram (from uml-diagrams.org)](/files/-MICi2nwCTedxQZXrWJ4)

## Create Component Diagram

To create a Component Diagram:

1. Select first an element where a new Component Diagram to be contained as a child.
2. Select **Model | Add Diagram | Component Diagram** in Menu Bar or select **Add Diagram | Component Diagram** in Context Menu.

> **See also**
>
> [UML Component Diagram](http://www.uml-diagrams.org/component-diagrams.html) - For more information about UML Component Diagram.

## Component

To create a Component:

1. Select **Component** in **Toolbox**.
2. Drag on the diagram as the size of Component.

To create a Component (model element only) by Menu:

1. Select an Element where a new Component to be contained.
2. Select **Model | Add | Component** in Menu Bar or **Add | Component** in Context Menu.

You can use **QuickEdit** for Component by double-click or press `Enter` on a selected Component.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.
* **Add Port** : Add a port.
* **Add Part** : Add a part.

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Artifact

To create a Artifact:

1. Select **Artifact** in **Toolbox**.
2. Drag on the diagram as the size of Artifact.

To create a Artifact (model element only) by Menu:

1. Select an Element where a new Artifact to be contained.
2. Select **Model | Add | Artifact** in Menu Bar or **Add | Artifact** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/working-with-uml-diagrams/class-diagram#classifier)).

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Component Realization

To create an Component Realization:

1. Select **Component Realization** in **Toolbox**.
2. Drag from an element (realizing) and drop on a Component (to be realized).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Deployment Diagram

![Deployment Diagram (from uml-diagrams.org)](/files/-MICkWhlRoCujD6QGjK6)

## Create Deployment Diagram

To create a Deployment Diagram:

1. Select first an element where a new Deployment Diagram to be contained as a child.
2. Select **Model | Add Diagram | Deployment Diagram** in Menu Bar or select **Add Diagram | Deployment Diagram** in Context Menu.

> **See also**
>
> [UML Deployment Diagram](http://www.uml-diagrams.org/deployment-diagrams-overview.html) - For more information about UML Deployment Diagram.

## Node

To create a Node:

1. Select **Node** in **Toolbox**.
2. Drag on the diagram as the size of Node.

To create a Node (model element only) by Menu:

1. Select an Element where a new Node to be contained.
2. Select **Model | Add | Node** in Menu Bar or **Add | Node** in Context Menu.

You can use **QuickEdit** for Node by double-click or press `Enter` on a selected Node.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.
* **Add Communicating Node** : Add a communicating node.
* **Add Deployed Component** : Add a deployed component.
* **Add Deployed Artifact** : Add a deployed artifact.

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Deployment

To create an Deployment:

1. Select **Deployment** in **Toolbox**.
2. Drag from an element (to be deployed) and drop on a Node.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Communication Path

To create an Communication Path:

1. Select **Communication Path** in **Toolbox**.
2. Drag from a Node and drop on another Node.

You can use **QuickEdit** for Association (See [Association](/working-with-uml-diagrams/class-diagram#association)).


# Use Case Diagram

![Use Case Diagram (from uml-diagrams.org)](/files/-MICliFgJLTApzyyCz-B)

## Create Use Case Diagram

To create a Use Case Diagram:

1. Select first an element where a new Use Case Diagram to be contained as a child.
2. Select **Model | Add Diagram | Use Case Diagram** in Menu Bar or select **Add Diagram | Use Case Diagram** in Context Menu.

> **See also**
>
> [UML Use Case Diagram](http://www.uml-diagrams.org/use-case-diagrams.html) - For more information about UML Use Case Diagram.

## Use Case Subject

To create an Use Case Subject:

1. Select **Use Case Subject** in **Toolbox**.
2. Drag on the diagram as the size of Use Case Subject.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Actor

To create an Actor:

1. Select **Actor** in **Toolbox**.
2. Drag on the diagram as the size of Actor.

To create an Actor (model element only) by Menu:

1. Select an Element where a new Actor to be contained.
2. Select **Model | Add | Actor** in Menu Bar or **Add | Actor** in Context Menu.

You can use **QuickEdit** for Actor by double-click or press `Enter` on a selected Actor.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Sub-Actor** : Add a sub-actor.
* **Add Super-Actor** : Add a super actor.
* **Add Associated Use Case** : Add an associated use case.

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Use Case

To create an Use Case:

1. Select **Use Case** in **Toolbox**.
2. Drag on the diagram as the size of Use Case.

To create an Use Case (model element only) by Menu:

1. Select an Element where a new Use Case to be contained.
2. Select **Model | Add | Use Case** in Menu Bar or **Add | Use Case** in Context Menu.

You can use **QuickEdit** for Use Case by double-click or press `Enter` on a selected Use Case.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Extension Point** (`Ctrl+Enter`) : Add an extension point.
* **Add Associated Actor** : Add an associated actor.
* **Add Included Use Case** : Add an included use case.
* **Add Extended Use Case** : Add an extended use case.

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Extension Point

To add an Extension Point:

1. Select an Use Case.
2. Select **Model | Add | Extension Point** in Menu Bar or **Add | Extension Point** in Context Menu.

You can use **QuickEdit** for Extension Point by double-click or press `Enter` on a selected Extension Point.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more extension point in the below.
* **Delete** (`Ctrl+Delete`) : Delete the extension point
* **Move Up** (`Ctrl+Up`) : Move the extension point up.
* **Move Down** (`Ctrl+Down`) : Move the extension point down.

## Include

To create an Include:

1. Select **Include** in **Toolbox**.
2. Drag from a Use Case and drop on another Use Case (to be included).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Extend

To create an Extend:

1. Select **Extend** in **Toolbox**.
2. Drag from a Use Case (to be extended) and drop on another Use Case.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Sequence Diagram

![Sequence Diagram (from uml-diagrams.org)](/files/-MICnb8M-BVR_7g9dtr9)

## Create Sequence Diagram

To create a Sequence Diagram:

1. Select first an element where a new Sequence Diagram to be contained as a child.
2. Select **Model | Add Diagram | Sequence Diagram** in Menu Bar or select **Add Diagram | Sequence Diagram** in Context Menu.

> **See also**
>
> [UML Sequence Diagram](http://www.uml-diagrams.org/sequence-diagrams.html) - For more information about UML Sequence Diagram.

You can show or hide sequence numbers of messages. To show or hide sequence numbers of message:

1. Check or Uncheck `showSequenceNumber` property of **Sequence Diagram** or **Communication Diagram**.

## Lifeline

To create a Lifeline:

1. Select **Lifeline** in **Toolbox**.
2. Drag on the diagram as the size of Lifeline.

To create a Lifeline from a Classifier (Class, Interface, etc.) by Drag-and-Drop:

1. Drag a Classifier from **Explorer**.
2. Drop on the diagram.

You can use **QuickEdit** for Lifeline by double-click or press `Enter` on a selected Lifeline.

* **Lifeline Expression** : Edit lifeline expression.

  *Syntax of Lifeline Expression*

  ```
  lifeline ::= [ '<<' stereotype `>>` ] [ visibility ] name [ '[' selector ']' ] [ ':' type ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  selector ::= (string)
  type ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Type** : Select a type of the lifeline.
* **Create Type** : Create a Class as a type of the lifeline.
* **Add Message with Lifeline** : Add a message with a lifeline.
* **Add Create Message with Lifeline** : Add a create message with a lifeline.
* **Add Self Message** : Add a self message.
* **Add Found Message** : Add a found message.
* **Add Lost Message** : Add a lost message.
* **Add Message from Gate** : Add a message from a gate.
* **Add Message to Gate** : Add a message to a gate.

## Message

To create a Message (or Self Message):

1. Select **Message** (or **Self Message**) in **Toolbox**.
2. Drag from a Lifeline and drop on another Lifeline. (Just click on a Lifeline if you want to create a self message.)

You can change the kind of message by setting `messageSort` property in **Property Editor**:

* `synchCall` : Synchronous Call
* `asynchCall` : Asynchronous Call
* `asynchSignal` : Asynchronous Signal
* `createMessage` : Create Message
* `deleteMessage` : Delete Message
* `reply` : Reply Message

You can use custom sequence numbers instead of auto-generated integer sequence numbers.

1. Enter sequence number for each Message's `sequenceNumber` property.
2. Change `sequenceNumbering` property of **Sequence Diagram** or **Communication Diagram** to `custom`.

You can use **QuickEdit** for Message by double-click or press `Enter` on a selected Message.

* **Message Expression** : Edit message expression.

  *Syntax of Message Expression*

  ```
  message ::= [ '<<' stereotype `>>` ] [ visibility ] [ target '=' ] name [ '(' arguments ')' ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  target ::= (identifier)
  name ::= (identifier)
  arguments ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Operation** : Select an operation as a signature of the message.
* **Create Operation** : Create an operation as a signature of the message.
* **Select Signal** : Select a signal as a signature of the message.
* **Create Signal** : Create a signal as a signature of the message.
* **Add Reply Message** : Add a reply message.

## Endpoint

To create an Endpoint:

1. Select **Endpoint** in **Toolbox**.
2. Click at the position on the diagram.

## Gate

To create a Gate:

1. Select **Gate** in **Toolbox**.
2. Click at the position on the diagram.

## State Invariant

To create a State Invariant:

1. Select **State Invariant** in **Toolbox**.
2. Click on a Lifeline where the State Invariant to be attached.

You can use **QuickEdit** for State Invariant by double-click or press `Enter` on a selected State Invariant.

* **Invariant** : Edit invariant property.

## Continuation

To create a Continuation:

1. Select **Continuation** in **Toolbox**.
2. Drag on the diagram as the size of Continuation.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Combined Fragment

To create a Combined Fragment:

1. Select **Combined Fragment** in **Toolbox**.
2. Drag on the diagram as the size of Combined Fragment.

You can change the operator by setting `interactionOperator` property in **Property Editor**:

* `alt` : alternatives
* `opt` : option
* `par` : parallel
* `loop` : iteration
* `critical` : critical region
* `neg` : negative
* `assert` : assertion
* `strict` : strict sequencing
* `seq` : weak sequencing
* `ignore` : ignore
* `consider` : consider
* `break` : break

You can use **QuickEdit** for Combined Fragment by double-click or press `Enter` on a selected Combined Fragment.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add Operand** : Add an interaction operand.

## Interaction Operand

You can use **QuickEdit** for Interaction Operand by double-click or press `Enter` on a selected Interaction Operand.

* **Guard** : Edit guard property.

## Interaction Use

To create a Interaction Use:

1. Select **Interaction Use** in **Toolbox**.
2. Drag on the diagram as the size of Interaction Use.


# Communication Diagram

![Communication Diagram (from uml-diagrams.org)](/files/-MICpoS_qw4t5S27mUPU)

## Create Communication Diagram

To create a Communication Diagram:

1. Select first an element where a new Communication Diagram to be contained as a child.
2. Select **Model | Add Diagram | Communication Diagram** in Menu Bar or select **Add Diagram | Communication Diagram** in Context Menu.

> **See also**
>
> [UML Communication Diagram](http://www.uml-diagrams.org/communication-diagrams.html) - For more information about UML Communication Diagram.

You can show or hide sequence numbers of messages. To show or hide sequence numbers of message:

1. Check or Uncheck `showSequenceNumber` property of **Sequence Diagram** or **Communication Diagram**.

## Lifeline

To create a Lifeline:

1. Select **Lifeline** in **Toolbox**.
2. Drag on the diagram as the size of Lifeline.

To create a Lifeline from a Classifier (Class, Interface, etc.) by Drag-and-Drop:

1. Drag a Classifier from **Explorer**.
2. Drop on the diagram.

You can use **QuickEdit** for Lifeline by double-click or press `Enter` on a selected Lifeline.

* **Lifeline Expression** : Edit lifeline expression.

  *Syntax of Lifeline Expression*

  ```
  lifeline ::= [ '<<' stereotype `>>` ] [ visibility ] name [ '[' selector ']' ] [ ':' type ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  selector ::= (string)
  type ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Type** : Select a type of the lifeline.
* **Create Type** : Create a Class as a type of the lifeline.
* **Add Connected Lifeline** : Add a lifeline with a connector.
* **Add Create Message with Lifeline** : Add a create message with a lifeline.
* **Add Self Connector** : Add a self connector.
* **Add Forward Message** : Add a forward message with a connected lifeline.
* **Add Reverse Message** : Add a reverse message with a connected lifeline.

## Connector

To create an Connector (or Self Connector):

1. Select **Connector** (or **Self Connector**) in **Toolbox**.
2. Drag from a Lifeline and drop on another Lifeline. (Just click on a Lifeline if you want to create a Self Connector.)

You can use **QuickEdit** for Connector by double-click or press `Enter` on a selected Connector.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Navigability** : Change navigability property.
* **Add Forward Message** : Add a forward message on the connector.
* **Add Reverse Message** : Add a reverse message on the connector.

## Message

To create a Forward Message:

1. Select **Forward Message** in **Toolbox**.
2. Click on a Connector.

To create a Reverse Message:

1. Select **Reverse Message** in **Toolbox**.
2. Click on a Connector.

You can use custom sequence numbers instead of auto-generated integer sequence numbers.

1. Enter sequence number for each Message's `sequenceNumber` property.
2. Change `sequenceNumbering` property of **Sequence Diagram** or **Communication Diagram** to `custom`.

You can use **QuickEdit** for Message (See [Message](/working-with-uml-diagrams/sequence-diagram#message)).


# Timing Diagram

![Timing Diagram (from uml-diagram.org)](/files/-MI2z3dRhLl5jp1VghUI)

## Create Timing Diagram

To create a Timing Diagram:

1. Select first an element where a new Timing Diagram to be contained as a child.
2. Select **Model | Add Diagram | Timing Diagram** in Menu Bar or select **Add Diagram | Timing Diagram** in Context Menu.

> **See also**
>
> [UML Timing Diagram](https://www.uml-diagrams.org/timing-diagrams.html) - For more information about UML Timing Diagram.

## Lifeline

To create a Lifeline:

1. Select **Lifeline** in **Toolbox**.
2. Drag on the diagram as the size of Lifeline.

To create a Lifeline from a Classifier (Class, Interface, etc.) by Drag-and-Drop:

1. Drag a Classifier from **Explorer**.
2. Drop on the diagram.

You can use **QuickEdit** for Lifeline by double-click or press `Enter` on a selected Lifeline.

* **Lifeline Expression** : Edit lifeline expression.
* **Visibility** : Change visibility property.
* **Select Type** : Select a type of the lifeline.
* **Create Type** : Create a Class as a type of the lifeline.
* **Create State/Condition** : Create a State/Condition on the lifeline.

## State/Condition

To create a State/Condition:

1. Select **State/Condition** in **Toolbox**.
2. Click on a Lifeline on the diagram.

You can use **QuickEdit** for State/Condition by double-click or press `Enter` on a selected State/Condition.

* **Name Expression** : Edit state/condition name.
* **Visibility** : Change visibility property.
* **Create Time Segment** : Create a Time Segment on the State/Condition.

## Time Segment

To create a Time Segment

1. Select **Time Segment** in **Toolbox**.
2. Click on a State/Condition area on the diagram.

## Time Tick

To create a Time Tick

1. Select **Time Tick** in **Toolbox**.
2. Click on the Timing Diagram Frame area on the diagram.

## Time Constraint

To create a Time Constraint

1. Select **Time Constraint** in **Toolbox**.
2. Click on an element (e.g. Message or Time Segment) to attach a time constraint on the diagram.

## Duration Constraint

To create a Duration Constraint

1. Select **Duration Constraint** in **Toolbox**.
2. Drag on the diagram as the size of Duration Constraint.

## Message

To create a Message:

1. Select **Message** in **Toolbox**.
2. Drag from a Time Segment and drop on another Time Segment.

For more about Message, visit the [Message](/working-with-uml-diagrams/sequence-diagram#message) section in Sequence Diagram.


# Interaction Overview Diagram

![Interaction Overview Diagram (from uml-diagram.org)](/files/-MI30dE-4ySmP11nb3tJ)

## Create Interaction Overview Diagram

To create an Interaction Overview Diagram:

1. Select first an element where a new Interaction Overview Diagram to be contained as a child.
2. Select **Model | Add Diagram | Interaction Overview Diagram** in Menu Bar or select **Add Diagram | Interaction Overview Diagram** in Context Menu.

> **See also**
>
> [UML Interaction Overview Diagram](https://www.uml-diagrams.org/interaction-overview-diagrams.html) - For more information about UML Interaction Overview Diagram

> Note that Interaction Overview Diagram is a kind of Activity Diagram, so all nodes are activity nodes and all edges are activity edges.

## Interaction Use

To create a Interaction Use node:

1. Select **Interaction Use** in **Toolbox**.
2. Drag on the diagram as the size of Interaction Use.

You can also create an Interaction Use node by drag and drop an existing Interaction Use from Model Explorer.

Double-clicking the node will select the corresponding Interaction Use element in Model Explorer.

## Interaction (inline)

To create a Interaction (inline) node:

1. Select **Interaction (inline)** in **Toolbox**.
2. Drag on the diagram as the size of Interaction.

Creating an Interaction (inline) node will also create a new Sequence Diagram. The sequence diagram is shown inside the Interaction Frame.

To edit the sequence diagram inside, double-click the Interaction Frame.

You can also create Interaction (inline) node by drag and drop an existing Sequence Diagram from Model Explorer.

## Initial

To create an Initial node:

1. Select **Initial** in **Toolbox**.
2. Click at the position on the diagram.

## Final

To create a Final node:

1. Select **Final** in **Toolbox**.
2. Click at the position on the diagram.

## Fork

To create a Fork node:

1. Select **Fork** in **Toolbox**.
2. Drag on the diagram as the size of Fork.

## Join

To create a Join node:

1. Select **Join** in **Toolbox**.
2. Drag on the diagram as the size of Join.

## Merge

To create a Merge node:

1. Select **Merge** in **Toolbox**.
2. Click at the position on the diagram.

## Decision

To create a Decision node:

1. Select **Decision** in **Toolbox**.
2. Click at the position on the diagram.

## Control Flow

To create a Control Flow:

1. Select **Control Flow** in **Toolbox**.
2. Drag from a node and drop on another node.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Statechart Diagram

![Statechart Diagram (from uml-diagrams.org)](/files/-MICxAvMSYxvy5EHLMAo)

## Create Statechart Diagram

To create a Statechart Diagram:

1. Select first an element where a new Statechart Diagram to be contained as a child.
2. Select **Model | Add Diagram | Statechart Diagram** in Menu Bar or select **Add Diagram | Statechart Diagram** in Context Menu.

> **See also**
>
> [UML Statechart Diagram](http://www.uml-diagrams.org/state-machine-diagrams.html) - For more information about UML Statechart Diagram.

## State

To create a Simple State:

1. Select **Simple State** in **Toolbox**.
2. Drag on the diagram as the size of Simple State.

To create a Composite State:

1. Select **Composite State** in **Toolbox**.
2. Drag on the diagram as the size of Composite State.

To create a Submachine State:

1. Select **Submachine State** in **Toolbox**.
2. Drag on the diagram as the size of Submachine State.
3. Select a StateMachine in **Element Picker Dialog**.

To create an Orthogonal State:

1. Select **Orthogonal State** in **Toolbox**.
2. Drag on the diagram as the size of Orthogonal State.

You can use **QuickEdit** for State by double-click or press `Enter` on a selected State.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add ConnectionPointReference** : Add a connection point reference.
* **Add Region** : Add a region.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Entry Activity** : Add an entry activity.
* **Add Do Activity** : Add an do activity.
* **Add Exit Activity** : Add an exit activity.
* **Add Internal Transition** : Add an internal transition.

## Internal Activity

To add an Entry Activity:

1. Select a State.
2. Select **Model | Add | Entry Activity** in Menu Bar or **Add | Entry Activity** in Context Menu.
3. Select a kind of Activity to create (one of OpaqueBehavior, Activity, StateMachine, or Interaction).

To add a Do Activity:

1. Select a State.
2. Select **Model | Add | Do Activity** in Menu Bar or **Add | Do Activity** in Context Menu.
3. Select a kind of Activity to create (one of OpaqueBehavior, Activity, StateMachine, or Interaction).

To add an Exit Activity:

1. Select a State.
2. Select **Model | Add | Exit Activity** in Menu Bar or **Add | Exit Activity** in Context Menu.
3. Select a kind of Activity to create (one of OpaqueBehavior, Activity, StateMachine, or Interaction).

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Internal Transition

To add an Internal Transition:

1. Select a State.
2. Popup Quic Edit for State by double click or press `Enter` on a selected State.
3. Select **Add Internal Transition** button in Quick Edit.

You can use **QuickEdit** for Internal Transition by double-click or press `Enter` on a selected Internal Transition.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add Trigger Event** : Add a trigger event.
* **Add Effect Behavior** : Add an effect behavior.

## Region

To add a Region:

1. Select a State.
2. Select **Model | Add | Region** in Menu Bar or **Add | Region** in Context Menu.

## Initial State

To create a Initial State:

1. Select **Initial State** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Choice

To create a Choice:

1. Select **Choice** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Join

To create a Join:

1. Select **Join** in **Toolbox**.
2. Drag on the diagram as the size of Join.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Fork

To create a Fork:

1. Select **Fork** in **Toolbox**.
2. Drag on the diagram as the size of Fork.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Junction

To create a Junction:

1. Select **Junction** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Shallow History

To create a Shallow History:

1. Select **Shallow History** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Deep History

To create a Deep History:

1. Select **Deep History** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Entry Point

To create a Entry Point:

1. Select **Entry Point** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Exit Point

To create a Exit Point:

1. Select **Exit Point** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Terminate

To create a Terminate:

1. Select **Terminate** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Final State

To create a Final State:

1. Select **Final State** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Connection Point Reference

To create a Connection Point Reference:

1. Select **Connection Point Reference** in **Toolbox**.
2. Click on a State where Connection Point Reference to be contained.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Transition

To create a Transition (or Self Transition):

1. Select **Transition** (or **Self Transition**) in **Toolbox**.
2. Drag from a State and drop on another State. (Just click on a State if you want to create a Self Transition.)

You can use **QuickEdit** for Transition by double-click or press `Enter` on a selected Transition.

* **Transition Expression** : Edit transition expression.

  *Syntax of Transition Expression*

  ```
  transition ::= [ trigger-list ] [ '[' guard ']' ] [ '/' effect ]
  trigger-list ::= trigger [ ',' trigger ]
  trigger ::= (identifier)
  guard ::= (string)
  effect ::= (identifier)
  ```
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Trigger Event** : Add a trigger event.
* **Add Effect Behavior** : Add an effect behavior.


# Activity Diagram

<img src="/files/Qvj0o7R9ZNPGICWLioaO" alt="Activity Diagram (from uml-diagrams.org)" width="563">

## Create Activity Diagram

To create an Activity Diagram:

1. Select first an element where a new Activity Diagram to be contained as a child.
2. Select **Model | Add Diagram | Activity Diagram** in Menu Bar or select **Add Diagram | Activity Diagram** in Context Menu.

> **See also**
>
> [UML Activity Diagram](http://www.uml-diagrams.org/activity-diagrams.html) - For more information about UML Activity Diagram.

## Action

To create an Action:

1. Select **Action** in **Toolbox**.
2. Drag on the diagram as the size of Action.

You can use **QuickEdit** for Action by double-click or press `Enter` on a selected Action.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add Input Pin** : Add an input pin.
* **Add Output Pin** : Add an output pin.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Trigger Event** : Add a trigger event.
* **Add Outgoing Control Flow** : Add an outgoing control flow with an action.
* **Add Incoming Control Flow** : Add an incoming control flow with an action.
* **Add Outgoing Object Flow** : Add an outgoing object flow with an object node.
* **Add Incoming Object Flow** : Add an incoming object flow with an object node.
* **Add Decision** : Add a decision with two additional actions.
* **Add Merge** : Add a merge with two additional actions.
* **Add Fork** : Add a fork with two additional actions.
* **Add Join** : Add a join with two additional actions.
* **Add Initial Node** : Add an initial node with a connected control flow.
* **Add Final Node** : Add an final node with a connected control flow.

## Trigger

To add a Trigger:

1. Select an Action.
2. Select **Model | Add | Trigger** in Menu Bar or **Add | Trigger** in Context Menu.

## Initial Node

To create an Initial Node:

1. Select **Initial** in **Toolbox**.
2. Click at the position on the diagram.

## Activity Final Node

To create an Activity Final Node:

1. Select **Activity Final** in **Toolbox**.
2. Click at the position on the diagram.

## Fork Node

To create a Fork Node:

1. Select **Fork** in **Toolbox**.
2. Drag on the diagram as the size of Fork.

## Join Node

To create a Join Node:

1. Select **Join** in **Toolbox**.
2. Drag on the diagram as the size of Join.

## Merge Node

To create a Merge Node:

1. Select **Merge** in **Toolbox**.
2. Click at the position on the diagram.

## Decision Node

To create a Decision Node:

1. Select **Decision** in **Toolbox**.
2. Click at the position on the diagram.

## Swimlane (Partition)

To create a Swimlane (Vertical or Horizontal):

1. Select **Swimlane (Vertical)** or **Swimlane (Horizontal)** in **Toolbox**.
2. Drag on the diagram as the size of Swimlane.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Interruptible Activity Region

To create an Interruptible Activity Region:

1. Select **Interruptible Activity Region** in **Toolbox**.
2. Drag on the diagram as the size of Interruptible Activity Region.

## Structured Activity Node

To create a Structured Activity Node:

1. Select **Structured Activity** in **Toolbox**.
2. Drag on the diagram as the size of Structured Activity Node.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Input Pin

To create an Input Pin:

1. Select **Input Pin** in **Toolbox**.
2. Click on an Action where Input Pin to be attached.

## Output Pin

To create an Output Pin:

1. Select **Output Pin** in **Toolbox**.
2. Click on an Action where Output Pin to be attached.

## Send Signal

To create a Send Signal:

1. Select **Send Signal** in **Toolbox**.
2. Drag on the diagram as the size of Send Signal.

Send Signal is actually an Action whose kind is `sendSignal`.

## Accept Signal

To create an Accept Signal:

1. Select **Accept Signal** in **Toolbox**.
2. Drag on the diagram as the size of Accept Signal.

Accept Signal is actually an Action whose kind is `acceptSignal`.

## Accept Time Event

To create an Accept Time Event:

1. Select **Accept Time Event** in **Toolbox**.
2. Drag on the diagram as the size of Accept Time Event.

Accept Time Event is actually an Action whose kind is `timeEvent`.

## Flow Final Node

To create a Flow Final Node:

1. Select **Flow Final** in **Toolbox**.
2. Click at the position on the diagram.

## Object Node

To create a Object Node:

1. Select **Object Node** in **Toolbox**.
2. Drag on the diagram as the size of Object Node.

You can use **QuickEdit** for Object Node by double-click or press `Enter` on a selected Object Node.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Outgoing Object Flow** : Add an outgoing object flow with an object node.
* **Add Incoming Object Flow** : Add an incoming object flow with an object node.
* **Add Outgoing Control Flow** : Add an outgoing control flow with an action.
* **Add Incoming Control Flow** : Add an incoming control flow with an action.

## Central Buffer

To create a Central Buffer:

1. Select **Central Buffer** in **Toolbox**.
2. Drag on the diagram as the size of Central Buffer.

You can use **QuickEdit** for Object Node (See [Object Node](/working-with-uml-diagrams/activity-diagram#object-node)).

## Datastore

To create a Datastore:

1. Select **Datastore** in **Toolbox**.
2. Drag on the diagram as the size of Datastore.

You can use **QuickEdit** for Object Node (See [Object Node](/working-with-uml-diagrams/activity-diagram#object-node)).

## Activity Parameter Node

To create an Activity Parameter Node:

1. Select **Activity Parameter Node** in **Toolbox**.
2. Drag on the diagram as the size of Activity Parameter Node.

If you set the name as blank, the associated parameter's textual notation will be shown as the name.

You can use **QuickEdit** for Object Node (See [Object Node](/working-with-uml-diagrams/activity-diagram#object-node)).

## Expansion Region

To create a Expansion Region:

1. Select **Expansion Region** in **Toolbox**.
2. Drag on the diagram as the size of Expansion Region.

You can use **QuickEdit** for Model Element (See [Model Element](/working-with-uml-diagrams/class-diagram#model-element)).

## Input Expansion Node

To create an Input Expansion Node:

1. Select **Input Expansion Node** in **Toolbox**.
2. Click on an Expansion Node where Input Expansion Node to be attached.

## Output Expansion Node

To create an Output Expansion Node:

1. Select **Output Expansion Node** in **Toolbox**.
2. Click on an Expansion Node where Output Expansion Node to be attached.

## Control Flow

To create a Control Flow:

1. Select **Control Flow** in **Toolbox**.
2. Drag from a node and drop on another node.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Object Flow

To create an Object Flow:

1. Select **Object Flow** in **Toolbox**.
2. Drag from a node and drop on another node.

## Exception Handler

To create an Extension Handler:

1. Select **Extension Handler** in **Toolbox**.
2. Drag from a node and drop on another node.

## Activity Interrupt

To create an Activity Interrupt:

1. Select **Activity Interrupt** in **Toolbox**.
2. Drag from a node and drop on another node.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Information Flow Diagram

![Information Flow Diagram (from uml-diagram.org)](/files/-MI346nQZK2z5ZuQOq1F)

## Create Information Flow Diagram

To create a Information Flow Diagram:

1. Select first an element where a new Information Flow Diagram to be contained as a child.
2. Select **Model | Add Diagram | Information Flow Diagram** in Menu Bar or select **Add Diagram | Information Flow Diagram** in Context Menu.

> **See also**
>
> [UML Information Flow Diagram](https://www.uml-diagrams.org/information-flow-diagrams.html) - For more information about UML Information Flow Diagram

## Information Item

To create an Information Item:

1. Select **Information Item** in **Toolbox**.
2. Drag on the diagram as the size of Information Item.

You can use **QuickEdit** for Information Item by double-click or press `Enter` on a selected Information Item.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint**: Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To suppress Receptions, see [Suppress Receptions](/user-guide/formatting-diagram#suppress-receptions).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

## Information Flow

To create an Information Flow:

1. Select **Information Flow** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Profile Diagram

![Profile Diagram](/files/-MID-KwUOUrIns2komj9)

## Create Profile Diagram

To create a Profile Diagram:

1. Select first an element where a new Profile Diagram to be contained as a child.
2. Select **Model | Add Diagram | Profile Diagram** in Menu Bar or select **Add Diagram | Profile Diagram** in Context Menu.

> **See also**
>
> [UML Profile Diagram](http://www.uml-diagrams.org/profile-diagrams.html) - For more information about UML Profile Diagram.

## Profile

To create a Profile (model element only) by Menu:

1. Select an Element where a new Profile to be contained.
2. Select **Model | Add | Profile** in Menu Bar or **Add | Profile** in Context Menu.

## MetaClass

To create a MetaClass:

1. Select **MetaClass** in **Toolbox**.
2. Drag on the diagram as the size of MetaClass.

To create a MetaClass (model element only) by Menu:

1. Select an Element where a new MetaClass to be contained.
2. Select **Model | Add | MetaClass** in Menu Bar or **Add | MetaClass** in Context Menu.

You can use **QuickEdit** for MetaClass by double-click or press `Enter` on a selected MetaClass.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Stereotype** : Add a stereotype with a connected extension.

## Stereotype

To create a Stereotype:

1. Select **Stereotype** in **Toolbox**.
2. Drag on the diagram as the size of Stereotype.

To create a Stereotype (model element only) by Menu:

1. Select an Element where a new Stereotype to be contained.
2. Select **Model | Add | Stereotype** in Menu Bar or **Add | Stereotype** in Context Menu.

You can use **QuickEdit** for Stereotype by double-click or press `Enter` on a selected Stereotype.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Sub-Stereotype** : Add a sub-stereotype.
* **Add Super-Stereotype** : Add a super stereotype.

To suppress Attributes, see [Suppress Attributes](/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/user-guide/formatting-diagram#show-operation-signature).

### Stereotype Icon

You can assign an icon for stereotype in two ways:

1. Image : Select an image file (PNG, JPEG) to the `image` property in **Property Editor**.
2. Icon Script : Write an icon script in `content` property in **Property Editor**.

Stereotype's `width` property and `height` property represents minimal width and minimal height of the icon respectively.

The assigned icon is shown when you set **Format > Stereotype Display** to **Decoration**, **Decoration with Label**, **Icon**, **Icon with Label** of the view elements.

### Icon Script

You can use very tiny icon script language to represent a stereotype icon as below:

```
!icon 40 40              # header (mandatory) : width height
l 0 0 40 40              # line : x1 y1 x2 y2
r 0 0 40 40              # rectangle : x1 y1 x2 y2
rr 0 0 40 40 5           # round rect : x1 y1 x2 y2 radius
e 0 0 40 40              # ellipse : x1 y1 x2 y2
pl 0 0 10 10 20 20 ...   # polyline : x1 y1 x2 y2 x3 y2 ...
pg 0 0 10 10 20 20 ...   # polygon : x1 y1 x2 y2 x3 y2 ...
a 20 20 15 90 180        # arc : x y radius startAngle endAngle
fr 0 0 40 40             # fill rect : x1 y1 x2 y2
frr 0 0 40 40 5          # fill round rect : x1 y1 x2 y2 radius
fe 0 0 40 40             # fill ellipse : x1 y1 x2 y2
fp 0 0 10 10 20 20 ...   # fill polygon : x1 y1 x2 y2 x3 y2 ...
fa 20 20 15 90 180       # fill arc : x y radius startAngle endAngle
%l #ffff00               # line color : color
%f #ffffff               # fill color : color
%a 0.4                   # alpha : alpha
%w 2                     # line width : width
%p 4 4                   # line pattern : line1 gap1 line2 gap2 ... 
```

The icon script must starts with `!icon` header. The width and height in  `!icon` header doesn't mean the actual icon size but means XY coordinates for the drawing commands. For example, if `!icon 40 40` is given, you can draw shapes in `(0, 0)` \~ `(40, 40)` coordinates.

Please note that the default line color and fill color are the view element's line color and fill color. If you use the command `%l` or `%f` without argument, the line color or the fill color is set to the view element's line color or fill color.

Here is an example of icon script for the entity, boundary, control standard stereotypes in UMLStandardProfile.

![Icons for entity, boundary, control stereotypes](/files/GxWfcKdlKZTB8HOvKYTu)

{% code title="<<entity>>" %}

```
!icon 40 40
e 3 3 37 37
l 3 37 37 37
```

{% endcode %}

{% code title="<<boundary>>" %}

```
!icon 50 40
e 10 0 50 40
l 0 0 0 40
l 0 20 10 20
```

{% endcode %}

{% code title="<<control>>" %}

```
!icon 40 40
e 5 5 35 35
l 20 5 25 0
l 20 5 25 10
```

{% endcode %}

## Extension

To create a Extension:

1. Select **Extension** in **Toolbox**.
2. Drag from a Stereotype and drop on a MetaClass.

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Requirement Diagram

![Requirement Diagram](/files/-MIHeNgCUaIyV4zgcToN)

## Create Requirement Diagram

To create a Requirement Diagram:

1. Select first an element where a new Requirement Diagram to be contained as a child.
2. Select **Model | Add Diagram | Requirement Diagram** in Menu Bar or select **Add Diagram | Requirement Diagram** in Context Menu.

## Requirement

To create a Requirement:

1. Select **Requirement** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use **QuickEdit** for Requirement by double-click or press `Enter` on a selected Requirement.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint**: Add a constraint.
* **Add Sub-Requirement** : Add a Requirement with a contained relationship.

To suppress Property Values, check (or uncheck) **Format | Suppress Property Values** in Menu Bar or Context Menu

## Copy

To create a Copy:

1. Select **Copy** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## DeriveReqt

To create a DeriveReqt:

1. Select **DeriveReqt** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Verify

To create a Verify:

1. Select **Verify** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Satisfy

To create a Satisfy:

1. Select **Satisfy** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).

## Refine

To create a Refine:

1. Select **Refine** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/working-with-uml-diagrams/class-diagram#relationship)).


# Block Definition Diagram

![Block Definition Diagram](/files/-MIHox224YM47HP-TB-y)

## Create Block Definition Diagram

To create a Block Definition Diagram:

1. Select first an element where a new Block Definition Diagram to be contained as a child.
2. Select **Model | Add Diagram | Block Definition Diagram** in Menu Bar or select **Add Diagram | Block Definition Diagram** in Context Menu.

## Block

To create a Block:

1. Select **Block** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Block (model element only) by Menu:

1. Select an Element where a new Block to be contained.
2. Select **Model | Add | Block** in Menu Bar or **Add | Block** in Context Menu.

You can use **QuickEdit** for Block by double-click or press `Enter` on a selected Block.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Part** : Add a part property.
* **Add Reference** : Add a reference property.
* **Add Value** : Add a value property (typed by ValueType).
* **Add Flow Property** : Add a flow property.
* **Add Constraint Property** : Add a constraint property.
* **Add Property** : Add a property.
* **Add Operation** : Add an operation.
* **Add Reception** : Add a reception.
* **Add Port** : Add a port.
* **Add Composited Block** : Add a composited block.

To suppress Constraint Properties, check (or uncheck) **Format | Suppress Constraints** in Menu Bar or Context Menu.

To suppress Part Properties, check (or uncheck) **Format | Suppress Parts** in Menu Bar or Context Menu.

To suppress Port Properties, check (or uncheck) **Format | Suppress Ports** in Menu Bar or Context Menu.

To suppress Reference Properties, check (or uncheck) **Format | Suppress References** in Menu Bar or Context Menu.

To suppress Values Properties, check (or uncheck) **Format | Suppress Values** in Menu Bar or Context Menu.

To suppress Properties, check (or uncheck) **Format | Suppress Properties** in Menu Bar or Context Menu.

To suppress Flow Properties, check (or uncheck) **Format | Suppress Flow Properties** in Menu Bar or Context Menu.

## Value Type

To create a Value Type:

1. Select **Value Type** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Value Type (model element only) by Menu:

1. Select an Element where a new Value Type to be contained.
2. Select **Model | Add | Value Type** in Menu Bar or **Add | Value Type** in Context Menu.

You can use **QuickEdit** for Value Type by double-click or press `Enter` on a selected Value Type.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** : Add an attribute.
* **Add Operation** : Add an operation.
* **Add Reception** : Add a reception.

To suppress Property Values, check (or uncheck) **Format | Suppress Property Values** in Menu Bar or Context Menu.

To suppress Attributes, check (or uncheck) **Format | Suppress Attributes** in Menu Bar or Context Menu.

To suppress Operations, check (or uncheck) **Format | Suppress Operations** in Menu Bar or Context Menu.

To suppress Receptions, check (or uncheck) **Format | Suppress Receptions** in Menu Bar or Context Menu.

## Interface Block

To create a Interface Block:

1. Select **Interface Block** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Interface Block (model element only) by Menu:

1. Select an Element where a new Interface Block to be contained.
2. Select **Model | Add | Interface Block** in Menu Bar or **Add | Interface Block** in Context Menu.

You can use the same **QuickEdit** for [Block](/working-with-sysml-diagrams/block-definition-diagram#block) by double-click or press `Enter` on the selected Interface Block.

## Constraint Block

To create a Constraint Block:

1. Select **Constraint Block** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Constraint Block (model element only) by Menu:

1. Select an Element where a new Constraint Block to be contained.
2. Select **Model | Add | Constraint Block** in Menu Bar or **Add | Constraint Block** in Context Menu.

You can use **QuickEdit** for Constraint Block by double-click or press `Enter` on a selected Constraint Block.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Parameter** : Add a constraint parameter.

To suppress Constraint Properties, check (or uncheck) **Format | Suppress Constraints** in Menu Bar or Context Menu.

To suppress Constraint Parameters, check (or uncheck) **Format | Suppress Properties** in Menu Bar or Context Menu.

## Port

To create a Port:

1. Select **Port** in **Toolbox**.
2. Click on the element (e.g. Class) where Port to be contained.

To create a Port (model element only) by Menu:

1. Select an Element where a new Port to be contained.
2. Select **Model | Add | Port** in Menu Bar or **Add | Port** in Context Menu.

You can use **QuickEdit** for Port by double-click or press `Enter` on a selected Port.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Block** : Select a Block and assign it to type property.
* **Create Block** : Create a Block and assign it to type property.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.

## Object

See [Object](/working-with-uml-diagrams/object-diagram#object) in Object Diagram.

## Connector

To create an Connector:

1. Select **Connector** in **Toolbox**.
2. Drag from an element (e.g. Port) and drop on another element (e.g. Part).

You can use **QuickEdit** for Connector by double-click or press `Enter` on a selected Connector.

* **Name Expression** : Edit name expression.
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Create Item Flow** : Create an Item Flow. The both Ports (or Parts) should be typed to create an Item Flow.


# Internal Block Diagram

![Internal Block Diagram](/files/-MK3OYtUzbe8rFgiNWaL)

## Create Block Definition Diagram

To create a Internal Block Diagram:

1. Select first a Block where a new Internal Block Diagram to be contained as a child.
2. Select **Model | Add Diagram | Internal Block Diagram** in Menu Bar or select **Add Diagram | Internal Block Diagram** in Context Menu.

## Part

To create a Part:

1. Select **Part** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use **QuickEdit** for Part by double-click or press `Enter` on a selected Part.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Block** : Select a Block and assign it to type property.
* **Create Block** : Create a Block and assign it to type property.
* **Select Value Type** : Select a Value Type and assign it to type property.
* **Create Value Type** : Create a Value Type and assign it to type property.
* **Add Port** : Add a port.

## Reference

To create a Reference:

1. Select **Reference** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use the same **QuickEdit** for [Part](/working-with-sysml-diagrams/internal-block-diagram#part) by double-click or press `Enter` on the selected Reference.

## Value

To create a Value:

1. Select **Value** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use the same **QuickEdit** for [Part](/working-with-sysml-diagrams/internal-block-diagram#part) by double-click or press `Enter` on the selected Value.

## Port

See [Port](/working-with-sysml-diagrams/block-definition-diagram#port) in Block Definition Diagram.

## Connector

See [Connector](/working-with-sysml-diagrams/block-definition-diagram#connector) in Block Definition Diagram.


# Parametric Diagram

![Parametric Diagram](/files/-MIIe4ZIRpi8UmFVk992)

## Create Block Definition Diagram

To create a Parametric Diagram:

1. Select first a Constraint Block where a new Parametric Diagram to be contained as a child.
2. Select **Model | Add Diagram | Parametric Diagram** in Menu Bar or select **Add Diagram | Parametric Diagram** in Context Menu.

## Constraint Property

To create a Constraint Property:

1. Select **Constraint Property** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Constraint Property (model element only) by Menu:

1. Select a Constraint Block where a new Constraint Property to be contained.
2. Select **Model | Add | Constraint Property** in Menu Bar or **Add | Constraint Property** in Context Menu.

You can use **QuickEdit** for Constraint Property by double-click or press `Enter` on a selected Constraint Property.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Constraint Block** : Select a Constraint Block and assign it to type property.
* **Create Constraint Block** : Create a Constraint Block and assign it to type property.
* **Add Constraint Parameter** : Add a constraint parameter.

## Constraint Parameter

To create a Constraint Parameter:

1. Select **Constraint Parameter** in **Toolbox**.
2. Click on the element (e.g. Constraint Property or Parametric Diagram Frame) where Constraint Parameter to be contained.

You can use **QuickEdit** for Constraint Parameter by double-click or press `Enter` on a selected Constraint Parameter.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Block** : Select a Block and assign it to type property.
* **Create Block** : Create a Block and assign it to type property.


# Entity-Relationship Diagram

![Entity-Relationship Diagram](/files/uRWXcc0u7SziwprUc96A)

## Create Entity-Relationship Diagram

To create a Entity-Relationship Diagram:

1. Select first an element where a new Entity-Relationship Diagram to be contained as a child.
2. Select **Model | Add Diagram | ER Diagram** in Menu Bar or select **Add Diagram | ER Diagram** in Context Menu.

## Data Model

To create a Data Model (model element only) by Menu:

1. Select an Element where a new Data Model to be contained.
2. Select **Model | Add | Data Model** in Menu Bar or **Add | Data Model** in Context Menu.

## Entity

To create an Entity:

1. Select **Entity** in **Toolbox**.
2. Drag on the diagram as the size of Entity.

To create a Entity (model element only) by Menu:

1. Select a Data Model where a new Entity to be contained.
2. Select **Model | Add | Entity** in Menu Bar or **Add | Entity** in Context Menu.

You can use **QuickEdit** for Entity by double-click or press `Enter` on a selected Entity.

* **Name** : Enter name.
* **Add Note** : Add a linked note.
* **Add Column** (`Ctrl+Enter`) : Add a column.
* **Add One to One** : Add an one-to-one relationship with an entity.
* **Add One to Many** : Add an one-to-many relationship with an entity.
* **Add Many to Many** : Add an many-to-many relationship with an entity.

To suppress Columns, see [Suppress Columns](/user-guide/formatting-diagram#suppress-columns).

## Column

To add a Column:

1. Select an Entity.
2. Select **Model | Add | Column** in Menu Bar or **Add | Column** in Context Menu.

You can use **QuickEdit** for Column by double-click or press `Enter` on a selected Column.

* **Column Expression** : Edit column expression.

  *Syntax of Column Expression*

  ```
  column ::= name [ ':' type ] [ '(' length ')' ]
  name ::= (identifier)
  type ::= (identifier)
  length ::= (string)
  ```
* **Primary Key** : Check whether the column is primary key or not.
* **Add** (`Ctrl+Enter`) : Add one more column in the below.
* **Delete** (`Ctrl+Delete`) : Delete the column
* **Move Up** (`Ctrl+Up`) : Move the column up.
* **Move Down** (`Ctrl+Down`) : Move the column down.

## Relationship

To create a Relationship:

1. Select **One-to-One Relationship**, **One-to-Many Relationship** or **Many-to-Many Relationship** in **Toolbox**.
2. Drag from an entity and drop on another entity.

You can use **QuickEdit** for Relationship by double-click or press `Enter` on a selected Relationship.

* **Name** : Enter name.
* **Identifying** : Check whether the relationship is identifying or not.
* **Add Note** : Add a linked note.

You can also use **QuickEdit** for Relationship End by double-click at the end side of a Relationship.

* **Name** : Enter name.
* **Cardinality** : Select cardinality of the selected relationship end.


# Flowchart Diagram

<img src="/files/-MID2H83Cglp5L0-lz_2" alt="Flowchart Diagram" width="563">

## Create Flowchart Diagram

To create a Flowchart Diagram:

1. Select first an element where a new Flowchart Diagram to be contained as a child.
2. Select **Model | Add Diagram | Flowchart Diagram** in Menu Bar or select **Add Diagram | Flowchart Diagram** in Context Menu.

## Flowchart Element

Flowchart Element is an abstract element of all flowchart elements.

You can use **QuickEdit** for Flowchart Element by double-click or press `Enter` on a selected Flowchart Element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Outgoing Process** : Add an outgoing flow with a process.
* **Add Incoming Process** : Add an incoming flow with a process.
* **Add Outgoing Decision** : Add an outgoing flow with a decision.
* **Add Incoming Decision** : Add an incoming flow with a decision.

## Flow

To create a Flow:

1. Select **Flow** in **Toolbox**.
2. Drag from an flowchart element and drop on another flowchart element.

You can use **QuickEdit** by double-click or press `Enter` on a selected flow.

* **Name** : Edit name.
* **Add Note** : Add a linked note.

## Process

To create a Process:

1. Select **Process** in **Toolbox**.
2. Drag on the diagram as the size of Process.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Terminator

To create a Terminator:

1. Select **Terminator** in **Toolbox**.
2. Drag on the diagram as the size of Terminator.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Decision

To create a Decision:

1. Select **Decision** in **Toolbox**.
2. Drag on the diagram as the size of Decision.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Delay

To create a Delay:

1. Select **Delay** in **Toolbox**.
2. Drag on the diagram as the size of Delay.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Predefined Process

To create a Predefined Process:

1. Select **Predefined Process** in **Toolbox**.
2. Drag on the diagram as the size of Predefined Process.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Alternate Process

To create a Alternate Process:

1. Select **Alternate Process** in **Toolbox**.
2. Drag on the diagram as the size of Alternate Process.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Data

To create a Data:

1. Select **Data** in **Toolbox**.
2. Drag on the diagram as the size of Data.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Document

To create a Document:

1. Select **Document** in **Toolbox**.
2. Drag on the diagram as the size of Document.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Multi-Document

To create a Multi-Document:

1. Select **Multi-Document** in **Toolbox**.
2. Drag on the diagram as the size of Multi-Document.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Preparation

To create a Preparation:

1. Select **Preparation** in **Toolbox**.
2. Drag on the diagram as the size of Preparation.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Display

To create a Display:

1. Select **Display** in **Toolbox**.
2. Drag on the diagram as the size of Display.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Manual Input

To create a Manual Input:

1. Select **Manual Input** in **Toolbox**.
2. Drag on the diagram as the size of Manual Input.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Manual Operation

To create a Manual Operation:

1. Select **Manual Operation** in **Toolbox**.
2. Drag on the diagram as the size of Manual Operation.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Card

To create a Card:

1. Select **Card** in **Toolbox**.
2. Drag on the diagram as the size of Card.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Punched Tape

To create a Punched Tape:

1. Select **Punched Tape** in **Toolbox**.
2. Drag on the diagram as the size of Punched Tape.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Connector

To create a Connector:

1. Select **Connector** in **Toolbox**.
2. Drag on the diagram as the size of Connector.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Off-Page Connector

To create a Off-Page Connector:

1. Select **Off-Page Connector** in **Toolbox**.
2. Drag on the diagram as the size of Off-Page Connector.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Or

To create a Or:

1. Select **Or** in **Toolbox**.
2. Drag on the diagram as the size of Or.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Summing Junction

To create a Summing Junction:

1. Select **Summing Junction** in **Toolbox**.
2. Drag on the diagram as the size of Summing Junction.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Collate

To create a Collate:

1. Select **Collate** in **Toolbox**.
2. Drag on the diagram as the size of Collate.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Sort

To create a Sort:

1. Select **Sort** in **Toolbox**.
2. Drag on the diagram as the size of Sort.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Merge

To create a Merge:

1. Select **Merge** in **Toolbox**.
2. Drag on the diagram as the size of Merge.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Extract

To create a Extract:

1. Select **Extract** in **Toolbox**.
2. Drag on the diagram as the size of Extract.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Stored Data

To create a Stored Data:

1. Select **Stored Data** in **Toolbox**.
2. Drag on the diagram as the size of Stored Data.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Database

To create a Database:

1. Select **Database** in **Toolbox**.
2. Drag on the diagram as the size of Database.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Direct Access Storage

To create a Direct Access Storage:

1. Select **Direct Access Storage** in **Toolbox**.
2. Drag on the diagram as the size of Direct Access Storage.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Internal Storage

To create a Internal Storage:

1. Select **Internal Storage** in **Toolbox**.
2. Drag on the diagram as the size of Internal Storage.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).


# Data Flow Diagram

![Data Flow Diagram](/files/-MID39mWxC-nvaAVfHHH)

## Create Data Flow Diagram

To create a Data Flow Diagram:

1. Select first an element where a new Data Flow Diagram to be contained as a child.
2. Select **Model | Add Diagram | Data Flow Diagram** in Menu Bar or select **Add Diagram | Data Flow Diagram** in Context Menu.

## Data Flow Model

To create a Data Flow Model (model element only) by Menu:

1. Select an Element where a new Data Flow Model to be contained.
2. Select **Model | Add | Data Flow Model** in Menu Bar or **Add | Data Flow Model** in Context Menu.

## External Entity

To create an External Entity:

1. Select **External Entity** in **Toolbox**.
2. Drag on the diagram as the size of External Entity.

You can use **QuickEdit** for External Entity by double-click or press `Enter` on a selected External Entity.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Outgoing Process** : Add an outgoing data flow with a process.

## Process

To create a Process:

1. Select **Process** in **Toolbox**.
2. Drag on the diagram as the size of Process.

You can use **QuickEdit** for Process by double-click or press `Enter` on a selected Process.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Incoming External Entity** : Add an incoming data flow with an external entity.
* **Add Outgoing Process** : Add an outgoing data flow with a process.
* **Add Outgoing Datastore** : Add an outgoing data flow with a datastore.

## Datastore

To create a Datastore:

1. Select **Datastore** in **Toolbox**.
2. Drag on the diagram as the size of Datastore.

You can use **QuickEdit** for Datastore by double-click or press `Enter` on a selected Datastore.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Incoming Process** : Add an incoming data flow with a process.

## Data Flow

To create a Data Flow:

1. Select **Data Flow** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected data flow.

* **Name** : Edit name.
* **Add Note** : Add a linked note.


# C4 Diagram

<figure><img src="/files/9u3WYNZ21gQDsIUyHato" alt=""><figcaption><p>C4 Diagram</p></figcaption></figure>

## Create C4 Diagram

To create a C4 Diagram:

1. Select first an element where a new C4 Diagram to be contained as a child.
2. Select **Model | Add Diagram | C4 Diagram** in Menu Bar or select **Add Diagram | C4 Diagram** in Context Menu.

## C4 Model

To create a C4 Model (model element only) by Menu:

1. Select an Element where a new C4 Model to be contained.
2. Select **Model | Add | C4 Model** in Menu Bar or **Add | C4 Model** in Context Menu.

## Element (Person, Software System, Container, Component)

To create a C4 element:

1. Select **Person, Software System, Container, Component or Element** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.

You can edit `description` or `technology` properties in **Property Editor**.

> An element is shown as a dashed boundary if it is shown in a diagram which is one of children of the element.

> If you need elements other than Person, Software System, Container or Component, you can use (general) **Element** in Toolbox for Deployment Node, Infrastructure Node, etc.

## Relationship

To create a relationship:

1. Select **Relationship** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit description.
* **Add Note** : Add a linked note.

You can edit `description` or `technology` properties in **Property Editor**.


# BPMN Diagram

BPMN (Business Process Modeling Notation) provides various types of diagram including Process Diagram, Collaboration Diagram, Choreography Diagram and Conversation Diagram. In StarUML, you can draw all types of diagram in a BPMN Diagram.

<figure><img src="/files/9esnWy8Al71jDDg5NHhc" alt=""><figcaption><p>BPMN Process Diagram</p></figcaption></figure>

<figure><img src="/files/hOQLuPPK2F7RlEvlyCyk" alt=""><figcaption><p>BPMN Collaboration Diagram</p></figcaption></figure>

<figure><img src="/files/6cGnDWzOMEurF8wEzkrc" alt=""><figcaption><p>BPMN Choreography Diagram</p></figcaption></figure>

<figure><img src="/files/YPgugyLxZ117H9yuuXkn" alt=""><figcaption><p>BPMN Conversation Diagram</p></figcaption></figure>

## Create BPMN Diagram

To create a BPMN Diagram:

1. Select first an element where a new BPMN Diagram to be contained as a child.
2. Select **Model | Add Diagram | BPMN Diagram** in Menu Bar or select **Add Diagram | BPMN Diagram** in Context Menu.

## Business Process

To create a Business Process (model element only) by Menu:

1. Select an Element where a new Business Process to be contained.
2. Select **Model | Add | Business Process** in Menu Bar or **Add | Business Process** in Context Menu.

## Pool (Participant)

To create a Pool (Participant) element:

1. Select the Pool (default is horizontal) or Pool (Vertical) element in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Add Lane** : Add a lane inside the Pool.

## Lane

To create a Lane element:

1. Select the Lane (default is horizontal) or Lane (Vertical) element in **Toolbox**.
2. Drag on the diagram as the size (inside a Pool element).

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Activities (Task, Sub Process, etc.)

To create a Activity element:

1. Select an Activity in **Toolbox**. **Task** element in BPMN Basic tool group and BPMN Activities tool group. You can also select various types of Tasks including **Send Task, Receive Task, Service Task, User Task, Manual Task, Business Rule Task, Script Task, Call Activity, Sub Process, Adhoc Sub Process, and Transaction**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Add Boundary Event** : Add a boundary event attached to the activity.

<figure><img src="/files/dzPOlexa9mh7jnTtU3jy" alt=""><figcaption><p>Types of Task</p></figcaption></figure>

## Sequence Flow

To create a sequence flow:

1. Select **Sequence Flow** in **Toolbox** (BPMN Basic group).
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit description.
* **Add Text Annotation** : Add a text annotation with association.

## Events (Start, Intermediate, Boundary, End)

To create an Event element:

1. Select an Event in **Toolbox** (BPMN Events group). You can create one of event types including **Start Event, Intermediate Catch Event, Intermediate Throw Event, Boundary Event** and **End Event**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Event Definitions**: Create one of the Event Definition elements: **Message**, **Timer**, **Error**, **Escalation**, **Cancel**, **Compensate**, **Conditional**, **Link**, **Signal**, **Terminate**, **Multiple**, **ParallelMultiple.**&#x20;

> You can create multiple Event Definitions for an Event

<figure><img src="/files/dqrq8aZO1pB3IsZaOqdg" alt=""><figcaption><p>Events with Event Definitions</p></figcaption></figure>

## Gateways

To create a Gateway element:

1. Select a Gateway in **Toolbox** (BPMN Gateways group). You can create one of gateway types including **Exclusive**, **Inclusive**, **Complex**, **Parallel**, and **Event-Based.**
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

<figure><img src="/files/8hz4svv5CEVljqAj3Lt3" alt=""><figcaption><p>Types of Gateway</p></figcaption></figure>

## Data Objects

To create a Data Object element:

1. Select a Data Object in **Toolbox** (BPMN Data group). You can create one of data object types including **Data Object**, **Data Store**, **Data Input**, and **Data Output.**
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Data Association

To create a data association:

1. Select **Data Association** in **Toolbox** (BPMN Data group).
2. Drag from an element and drop on another element.

## Message

To create a Message element:

1. Select the Message in **Toolbox** (BPMN Message group).
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Message Flow

To create a message flow:

1. Select **Message Flow** in **Toolbox** (BPMN Message group).
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit description.
* **Add Text Annotation** : Add a text annotation with association.

## Choreography Task

To create a Choreography Task element:

1. Select a Choreography Task in **Toolbox** (BPMN Choreography group). You can also create **Sub Choreography.**
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Assign Participant (Upper)** : Assign an existing participant into upper side.
* **Assign Participant (Lower)** : Assign an existing participant into lower side.
* **Create Participant (Upper)** : Create a participant and assign it to into upper side.
* **Create Participant (Lower)** : Create a participant and assign it to into lower side.
* **Initiating Participant** : Assign an initiating participant (shown with gray background color).
* **Create Initiating Message** : Create an initiating Message and link it with Message Link.
* **Create Return Message** : Create a return Message and link it with Message Link (shown with gray color).

## Conversation

To create a conversation element:

1. Select the Conversation in **Toolbox** (BPMN Conversation group). You can create also **Sub Conversation** or **Call Conversation**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Conversation Link

To create a conversation link:

1. Select **Conversation Link** in **Toolbox** (BPMN Conversation group).
2. Drag from an element and drop on another element.

## Text Annotation

To create a text annotation element:

1. Select the Text Annotation in **Toolbox** (BPMN Artifact group).
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Text** : Edit text.

## Association

To create an association:

1. Select **Association** in **Toolbox** (BPMN Artifact group).
2. Drag from an element and drop on another element.

## Group

To create a group element:

1. Select the Group in **Toolbox** (BPMN Artifact group).
2. Drag on the diagram as the size.


# Mindmap Diagram

<figure><img src="/files/ybndBq8bNykpeTQjupr1" alt=""><figcaption><p>Mindmap Diagram</p></figcaption></figure>

## Create Mindmap Diagram

To create a Mindmap Diagram:

1. Select first an element where a new Mindmap Diagram to be contained as a child.
2. Select **Model | Add Diagram | Mindmap Diagram** in Menu Bar or select **Add Diagram | Mindmap Diagram** in Context Menu.

## Mindmap Model

To create a Mindmap Model (model element only) by Menu:

1. Select an Element where a new Mindmap Model to be contained.
2. Select **Model | Add | Mindmap** in Menu Bar or **Add | Mindmap** in Context Menu.

## Node

To create a node element:

1. Select  **Node** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Node Left** : Add a linked node to the left.
* **Add Node Right** : Add a linked node to the right.

## Edge

To create an edge:

1. Select **Edge** in **Toolbox**.
2. Drag from a node and drop on another node.


# Wireframe Diagram

<figure><img src="/files/8PxUHjHWNWBcLE3YAxYp" alt=""><figcaption><p>Wireframe Diagram (Mobile)</p></figcaption></figure>

<figure><img src="/files/3A9YsdzxDg0SCs9O22P7" alt=""><figcaption><p>Wireframe Diagram (Web)</p></figcaption></figure>

## Create Wireframe Diagram

To create a Wireframe Diagram:

1. Select first an element where a new Wireframe Diagram to be contained as a child.
2. Select **Model | Add Diagram | Wireframe Diagram** in Menu Bar or select **Add Diagram | Wireframe Diagram** in Context Menu.

## Wireframe Model

To create a Wireframe Model (model element only) by Menu:

1. Select an Element where a new Wireframe Model to be contained.
2. Select **Model | Add | Wireframe** in Menu Bar or **Add | Wireframe** in Context Menu.

## Frame

To create a frame element:

1. Select **Frame** in **Toolbox**. You can select one of the frames including **Frame** (General), **Frame (Mobile)**, **Frame (Web)**, **Frame (Desktop)**.
2. Drag on the diagram as the size.

## Button

To create a button element:

1. Select  **Button** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Text

To create a text element:

1. Select  **Text** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

> You can also use **Text** or **TextBox** in **Annotations Toolbox**

## Radio

To create a ratio element:

1. Select  **Ratio** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

> You can show checked state by checking `checked` property in **Property Editor**

## Checkbox

To create a checkbox element:

1. Select  **Checkbox** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

> You can show checked state by checking `checked` property in **Property Editor**

## Switch

To create a switch element:

1. Select  **Switch** in **Toolbox**.
2. Drag on the diagram as the size.

> You can show checked state by checking `checked` property in **Property Editor**

## Link

To create a link element:

1. Select  **Link** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Tab

To create a tab element:

1. Select  **Tab** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Tab List

To create a tab list element:

1. Select  **Tab List** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Add Tab** : Add a tab.
* **Add Note** : Add a note.

## Input

To create an input element:

1. Select  **Input** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Dropdown

To create a dropdown element:

1. Select **Dropdown** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Panel

To create a panel element:

1. Select **Panel** in **Toolbox**.
2. Drag on the diagram as the size.

## Image

To create an image element:

1. Select **Image** in **Toolbox**.
2. Drag on the diagram as the size.

## Separator

To create a separator element:

1. Select **Separator** in **Toolbox**.
2. Drag on the diagram as the size.

> You can show the separator vertically by checking `isVertical` property in **Property Editor**

## Avatar

To create an avatar element:

1. Select **Avatar** in **Toolbox**.
2. Drag on the diagram as the size.

## Slider

To create a slider element:

1. Select **Slider** in **Toolbox**.
2. Drag on the diagram as the size.

> You can adjust the slider handle by setting the `value` property (0\~ 100) in **Property Editor**.


# AWS Architecture Diagram

<figure><img src="/files/r7XLNIgusvJFxIpOSlwh" alt=""><figcaption><p>AWS Architecture Diagram</p></figcaption></figure>

## Create AWS Architecture Diagram

To create a AWS Architecture Diagram:

1. Select first an element where a new AWS Architecture Diagram to be contained as a child.
2. Select **Model | Add Diagram | AWS Architecture Diagram** in Menu Bar or select **Add Diagram | AWS Architecture Diagram** in Context Menu.

## AWS Model

To create a AWS Model (model element only) by Menu:

1. Select an Element where a new AWS Model to be contained.
2. Select **Model | Add | AWS Model** in Menu Bar or **Add | AWS Model** in Context Menu.

## AWS Group

To create a AWS Group element:

1. Select **AWS Group** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **AWS Icon** : Change AWS icon.

## AWS Generic Group

To create a AWS Generic Group element:

1. Select **AWS Generic Group** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.

You can set `dashed` property in **Property Editor** if you want to show dashed style group.

## AWS Availability Zone

To create a AWS Availability Zone element:

1. Select **AWS Availability Zone** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.

## AWS Security Group

To create a AWS Security Group element:

1. Select **AWS Security Group** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.

## AWS Service

To create a AWS Service element:

1. Select **AWS Service** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **AWS Icon** : Change AWS icon.

## AWS Resource

To create a AWS Resource element:

1. Select **AWS Resource** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **AWS Icon** : Change AWS icon.

## AWS General Resource

To create a AWS General Resource element:

1. Select **AWS General Resource** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **AWS Icon** : Change AWS icon.

## AWS Callout

To create a AWS Callout element:

1. Select **AWS Callout** in **Toolbox**.
2. Click on the diagram where you want to create.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit callout number.

## AWS Arrow

To create a AWS Arrow:

1. Select **AWS Arrow** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit description.
* **Add Note** : Add a linked note.


# GCP Architecture Diagram

<figure><img src="/files/m1OAZrXhFaKLy7vmirp2" alt=""><figcaption><p>GCP (Google Cloud Platform) Architecture Diagram</p></figcaption></figure>

<figure><img src="/files/rPQxhGYdVWueicdBocd8" alt=""><figcaption><p>GCP (Google Cloud Platform) Architecture Diagram</p></figcaption></figure>

## Create GCP Architecture Diagram

To create a GCP Architecture Diagram:

1. Select first an element where a new GCP Architecture Diagram to be contained as a child.
2. Select **Model | Add Diagram | GCP Architecture Diagram** in Menu Bar or select **Add Diagram | GCP Architecture Diagram** in Context Menu.

## GCP Model

To create a GCP Model (model element only) by Menu:

1. Select an Element where a new GCP Model to be contained.
2. Select **Model | Add | GCP Model** in Menu Bar or **Add | GCP Model** in Context Menu.

## Zone

To create a Zone element:

1. Select **Zone** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Zone Type** : Change zone type.

## User

To create a User element:

1. Select **User** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **GCP Icon** : Change GCP icon.

## Product

To create a Product element:

1. Select **Product** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **GCP Icon** : Change GCP icon.

If you want to show multi instance, check `multiInstance` property in **Property Editor**.

If you want to expand, check `expanded` property in **Property Editor**. One you expanded, you can show more information as below

* `expandedInfo` : Shown below the product name (e.g. `10GB PD` or `Autoscaling`, etc.)
* &#x20;`machineType` : Show below as machine type icon with circled number of `cores` and `ram`. The circled numbers are shown only if the number is greater than 0.
* `diskType` : Show below as disk icon with circled number of `disks`. The circled numbers are shown only if the number is greater than 0.
* `additionalModifier` : Shown below as a modifier icon.

## Service

To create a Service element:

1. Select **Service** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **GCP Icon** : Change GCP icon.

## Path

To create a Path Arrow:

1. Select **Path** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit name.
* **Add Note** : Add a linked note.


# Getting Started

Let's start to create an HelloWorld extension for StarUML. Full source codes of HelloWorld extension are available at <https://github.com/staruml/staruml-helloworld>.

{% hint style="success" %}
Additional resources and docs for developers

* [StarUML sample models](https://github.com/staruml/staruml-samples)
* [StarUML metamodel](https://files.staruml.io/api-docs/6.0.0/metamodel/index.html)
* [API reference](https://files.staruml.io/api-docs/6.0.0/api/index.html)
  {% endhint %}

## Create an extension

First we need to create an extension folder. Open your extensions folder.

* MacOS: `~/Library/Application Support/StarUML/extensions/user`
* Windows: `C:\Users\<user>\AppData\Roaming\StarUML\extensions\user`
* Linux: `~/.config/StarUML/extensions/user`&#x20;

Create a new folder `HelloWorld` in your extensions folder.

## Extension package layout

An extension may have following folder structure:

```
my-extension/
├─ menus/
├─ keymaps/
├─ toolbox/
├─ stylesheets/
├─ preferences/
├─ main.js
└─ package.json
```

* `/menus` See [Menus](/developing-extensions/menus).
* `/keymaps` See [Keymaps](/developing-extensions/keymaps).
* `/toolbox` See [Toolbox](/developing-extensions/toolbox).
* `/stylesheets` Place CSS stylesheet files (`.css`).
* `/preferences` See [Preferences](/developing-extensions/defining-preferences).
* `main.js`
* `package.json`&#x20;

## Create `main.js`

Create `main.js` in the new extension folder. `main.js` is the entry point to be executed when StarUML is started. `init()` function will be called when the extension is loaded. `init()` is optional, not mandatory.

```javascript
function init() {
  // ...
}

exports.init = init
```

{% hint style="info" %}
The StarUML extension does not support loading external modules. If you use external modules, you need to build them into a single JavaScript file using tools such as Webpack or Vite.
{% endhint %}

## Application Context

To write an extension with Javascript, you need to use StarUML's open APIs. You can use most of API functions via the application context object `app`. The `app` includes objects providing useful APIs for commands, menus, keymaps, preferences, factory, dialogs, etc. For more about `app` object, see [API Reference](https://files.staruml.io/api-docs/6.0.0/api/index.html).

> **Note**
>
> StarUML is developed based on [electron](https://electronjs.org/) platform, so you can also use electron APIs in your extension.

## Add a command

A command is an execution unit which can be bound with a menu item as well as a keyboard shortcut. For more about command, see [Commands](/developing-extensions/commands).

In Hello World extension, we will add a command that showing "Hello, World!" message with id `helloworld:show-message` as bellow:

```javascript
function handleShowMessage () {
  window.alert('Hello, world!')
}

function init () {
  app.commands.register('helloworld:show-message', handleShowMessage)
}

exports.init = init
```

You can find and execute the command by [Command Palette](/user-guide/user-interface#command-palette) (`Ctrl+Shift+P` or `Cmd+Shift+P`).

## Add a menu item

We will add a menu item named **Hello World** under **Tools** menu. To add a menu item, we need to create a folder `/menus` and a menu JSON file `helloworld.json` in the folder.

```
staruml-helloworld/
├─ menus/
│  └─ helloworld.json
└─ main.js
```

The menu JSON file is as below:

```javascript
{
  "menu": [
    {
      "id": "tools",
      "submenu": [
        {
          "label": "Hello World",
          "id": "tool.helloworld",
          "command": "helloworld:show-message"
        }
      ]
    }
  ]
}
```

## Add a shortcut

We will also bind a keyboard shortcut `Ctrl+W` (`Cmd+W` for MacOS) to the command, so we need to create a folder `/keymaps` and a keymap JSON file `helloworld.json` in the folder.

```
staruml-helloworld/
├─ menus/
│ └─ helloworld.json
├─ keymaps/
│ └─ helloworld.json
└─ main.js
```

The keymap JSON file is as below:

```javascript
{
  "cmdctrl-w": "helloworld:show-message"
}
```

Now when user selects the menu item or press `Ctrl+W` (`Cmd+W` for MacOS), the command `helloworld:show-message` will be executed to show alert dialog with message "Hello, World!".

## Run and Debug

If you finished editing `main.js`, then just restart StarUML. However, restarting whenever you modified codes is very tedious. So, just reload by pressing `Ctrl+R` (`Cmd+R` for MacOS) or selecting **Debug > Reload** menu item.

It is useful to use **DevTools** to debug an extension. To open **DevTools**, select **Debug > Show DevTools**. You can see all console errors and logs.

## Define `package.json`

If you consider to distribute your extension to other users, you need to create a `package.json` file containing metadata for the extension.

```javascript
{
  "name": "your_id.helloworld",
  "title": "HelloWorld",
  "description": "HelloWorld extension example.",
  "homepage": "https://github.com/staruml/staruml-helloworld",
  "version": "1.0.0",
  "keywords": ["example", "helloworld"],
  "author": {
    "name": "Minkyu Lee",
    "email": "niklaus.lee@gmail.com",
    "url": "https://github.com/niklauslee"
  },
  "license": "MIT",
  "engines": {
    "staruml": ">=3.0.0"
  }
}
```

Restart StarUML and then check whether your extension is properly shown in **Extension Manager** or not. (select **Tools > Extension Manager** and click **Installed** tab).

## Distribute your extension

To allow other users to install your extension, there are several possible ways:

1. Distribute as ZIP archive. Zip the extension folder `staruml-helloworld` as `staruml-helloworld.zip` and just unzip the file in other user's the extensions folder explained above.
2. Distribute via Github URL. Users can install from Github URL. In **Extension Manager**, click **Install from URL** and enter the Github URL (e.g. `https://github.com/staruml/staruml-helloworld`) and press **Install** button.
3. Distribute via Extensions Registry. If you want to register official extensions registry. Please contact us (<support@staruml.io>)


# Commands

In this chapter, we're going to learn how to make commands.

## Making a command

A command is an execution unit that can be called by menu item, keyboard shortcuts or any parts of applications via API. All menu items such as **File > Open...**, **Edit > Copy** have corresponding commands. So you must make a command first before to add a menu item. As shown in [Getting Started](/developing-extensions/getting-started), we will make a simple command showing a message in alert dialog.

First you have to defined an unique ID for a command. Typical command ID have the form `<group>:<function>` where `<group>` is the group name of commands and `<function>` is the function name of the command. An extension may have a set of commands, so typically the group name is the extension name. For example, the ID of the command showing a message of HelloWorld extension is `helloworld:show-message`.

And then, we will define a handler function to be executed when the command is called.

```javascript
function handleShowMessage() {
  window.alert('Hello, world!')
}
```

Finally, we need to register this command to application by calling `app.commands.register` method. The first parameter is the ID of the command and the second is the handler function and the third (optional) is the display name of the command (Shown in [Command Palette](/user-guide/user-interface#command-palette)).

```javascript
app.commands.register('helloworld:show-message', handleShowMessage, 'Show Message')
```

## Calling a command

Now we have a new `helloworld:show-message` command. It can be called manually as follow:

```javascript
app.commands.execute('helloworld:show-message')
```

All functionalities of StarUML are defined as commands so that you can call without defining duplicated functionality.

```javascript
var ids = Object.keys(app.commands.commands)
console.log(ids); // you can see all available command IDs
app.commands.execute('project:open') // execute `project:open` command
```

## Passing parameters

You can pass one or more parameters to the command. We will fix the handle function so that it can receive a parameter (two or more parameters are possible).

```javascript
function handleShowMessage(message) {
  if (message) {
    window.alert(message)
  } else {
    window.alert('Hello, world!')
  }
}
```

Then, you can pass a string to the parameter as follow:

```javascript
app.commands.execute('helloworld:show-message', 'New Message')
```


# Menus

Menus are defined in one or more JSON files. A menu file can define or extend **application menu** and **context menus**. All menu files are loaded in alphabetical order.

```javascript
{
  "menu": [],
  "context-menu": []
}
```

The menu JSON files should be placed in `menus/` folder of the extension.

```
my-extension/
└─ menus/
   └─ menu.json
```

## Application Menu

Now we're going to explain how to add menu items in application menu that is placed in the top of the screen except in Windows which placing on the top of the StarUML window.

### Adding a top-level menu items

We will add a top-level menu item `Menu1` and three sub menu items `Sub Menu1`, `Sub Menu2` and `Sub Menu3`. There will be a separator between `Sub Menu2` and `Sub Menu3`.

We assumes that the commands corresponds to menu items were already defined. To add commands, please refer [Adding Commands](https://github.com/staruml/staruml-gitbook/tree/a4e7d94a6d3e900751c092bd56ef0f5f8b857276/developing-extensions/adding-commands.md).

```javascript
{
  "menu": [
    {
      "id": "menu1",
      "label": "Menu1",
      "submenu": [
        {
          "label": "Sub Menu1",
          "id": "menu1.submenu1",
          "command": "example:function1"
        },
        {
          "label": "Sub Menu2",
          "id": "menu1.submenu2",
          "command": "example:function2"
        },
        { "type": "separator" },
        {
          "label": "Sub Menu3",
          "id": "menu1.submenu3",
          "command": "example:function3"
        }
      ]
    }
  ]
}
```

Each menu item may have following properties:

* **id** : Unique id of the menu item. If `id` is omitted, `command` id will be used for the id.
* **label** : Label for the menu item.
* **command** : A command id to be executed when the menu item selected.
* **submenu** : Submenu items of this menu item.
* **type** : Type of the menu item. One of the values `separator` | `checkbox`.
* **position** : Position of the menu item to be added. One of the values `first` | `last` (default) | `before` | `after`.
* **relative-id** : Relative menu item id for position `before` and `after`.

If you want to add a separator:

```javascript
{ "type": "separator" }
```

### Adding menu items in existing menu items

You can add menu items to an existing menu such as **File**, **Edit**, **Tools**, etc.

We're going to add two sub menu items under the existing **Tools** menu item. All menu items have unique ID. If `id` matches an existing id of menu item, submenu items will be added under the existing menu item.

```javascript
{
  "menu": [
    {
      "id": "tools",
      "submenu": [
        {
          "label": "Tool Sub Menu1",
          "id": "tools.submenu1",
          "command": "example:function1"
        },
        {
          "label": "Tool Sub Menu2",
          "id": "tools.submenu2",
          "command": "example:function2"
        }
      ]
    }
  ]
}
```

### Changing states of menu items

Each menu item has three states *checked*, *enabled*, and *visible*. Here we're going to show how to change the states of existing menu items. You will be able to see the changed state in the both application menu and context menus.

Checked state can be changed only for the menu item defined with type is `checkbox`. To change checked states of menu items as follow.

```javascript
// Change checked states
var checkedStates = {
  'format.show-shadow': true,  //checked
  'format.auto-resize': false  // unchecked
}
app.menu.updateStates(null, null, checkedState)
```

You can also change the visible and enabled states of the menu item **Edit > Select All** as follow:

```javascript
// Change visible state
app.menu.updateStates({ 'edit.select-all': false }, null, null)  // hide
app.menu.updateStates({ 'edit.select-all': true }, null, null)   // show

// Change enabled state
app.menu.updateStates(null, { 'edit.select-all': false }, null)  // disabled
app.menu.updateStates(null, { 'edit.select-all': true }, null)   // enabled
```

## Context Menu

Adding menu items to context menus is basically same with application menu. One difference is that there is only one application menu, but there may be multiple context menus. So the context menus are defined in the menu JSON files as follow:

```javascript
{
  "context-menu": {
    "<dom-selector-for-context-menu1>": [],
    "<dom-selector-for-context-menu2>": [],
    ...
  }
}
```

[DOM selector](https://www.w3.org/TR/selectors-api/) is used to specify a context menu. This means the context menu will be popup when user click mouse right button on the DOM element specified by the DOM selector.

There are three predefined context menus with DOM selectors.

* `#diagram-canvas` : [Diagram Area](/user-guide/user-interface#diagram-area)
* `#model-explorer-holder .treeview` : [Model Explorer](/user-guide/user-interface#model-explorer)
* `#working-diagrams ul.listview` : [Working Diagrams](/user-guide/user-interface#working-diagrams).

### Adding menu items in a predefined context menu

We're going to add a menu item to a predefined context menu of **Diagram Area**.

```javascript
{
  "context-menu": {
    "#diagram-canvas": [
      {
        "label": "Submenu1 for Diagram Area",
        "id": "example.submenu1",
        "command": "example:function1"
      }
    ]
  }
}
```

Click mouse right button on diagram area, you will see the added menu item in the context menu.

### Adding a new context menu

StarUML even allows adding a new Context Menu for a specific DOM element. In here, instead of adding new DOM element we will use an existing DOM element, [Statusbar](/user-guide/user-interface#statusbar), which doesn't have any context menu.

**Statusbar** is defined as a DIV element like as `<div id="statusbar" ...></div>`. You can find in **Elements** tab of **DevTools** (**Debug > Show DevTools**). We can add a new Context Menu having only one menu item for **Statusbar** as follow:

```javascript
{
  "context-menu": {
    "#statusbar": [
      {
        "label": "Submenu1 for StatusBar",
        "id": "example.submenu1",
        "command": "example:function1"
      }
    ]
  }
}
```

Click mouse right button on **Statusbar**, you will see the new context menu.


# Keymaps

A command may have a corresponding keyboard shortcut. You can define key bindings for commands in keymap JSON files like below:

```javascript
{
  "ctrl-n": "application:new",
  "ctrl-c": "edit.copy",
  ...
}
```

Key binding should be a combination of following keys with `-` separator.

* **Character literals** : `a`, `1`, `,`, ...
* **Modifier keys** : `ctrl`, `cmd`, `shift`, `alt`, `cmdctrl` (`cmdctrl` is automatically recognized in `cmd` in MacOS and `ctrl` in Windows and Linux and `alt` is corresponds to **option** key in MacOS)
* **Special keys** : `enter`, `space`, `up`, `down`, `left`, `right`, `delete`, `tab`, `escape`, `backspace`, `home`, `end`, `pageup`, `pagedown`

The key bindings is shown in menu items of the same commands automatically.

The keymap JSON files should be placed in `keymaps/` folder of the extension and the keymap files are loaded in alphabetical order.

```
my-extension/
└─ keymaps/
   └─ keymap.json
```


# Toolbox

If you want to add your tool items in **Toolbox**, you need to define a toolbox JSON in your extension. The toolbox JSON files should be placed in `toolbox/` folder in your extension.

```
my-extension/
└─ toolbox/
   └─ toolbox.json
```

## Tool Group

The toolbox JSON defines an array of Tool Group definitions as below:

```json
[
  {
    "label": "Tool Group 1",
    "id": "tool-group-1",
    "diagram-types": [ "UMLClassDiagram" ],
    "items": [
      {
        "label": "Tool Item 1",
        "id": "tool-item-1",
        "icon": "icon-UMLClass",
        "rubberband": "rect",
        "command": "my:add-element",
        "command-arg": {
          "id": "UMLClass",
          "stereotype": "my-stereotype"
        }
      },
      ...
    ]
  },
  ...
]
```

* `label` : The tool group title shown in the Toolbox.
* `id` : Unique identifier.
* `diagram-types` : A list of diagram types. The tool group will be shown only when one of the diagram-types is active. (e.g. `"UMLClassDiagram"`, `"UMLUseCaseDiagram"`, ...)
* `items` : A list of tool item definitions.

## Tool Item

A tool item represents an element that users can create on a diagram.

* `label` : The tool item title shown in the Toolbox
* `id` : Unique identifier of the tool item.
* `icon` : Icon CSS class name. You can specify already defined icon names (e.g. `"icon-UMLClass"`, `"icon-UMLPackage"`, ...) or your own CSS class name in stylesheets of your extension.
* `rubberband` : A type of rubberband. One of `"rect"`(for sizable node-type elements),  `"line"`(for edge-type elements), `"point"`(for fixed-size node-type elements).
* `command` : A command name to be executed.
* `command-arg` : An argument object will be passed to the command.

## Command

A command used for tool item should create an element on a diagram. We strongly recommend to use `app.factory.createModelAndView()` function to create an element. See the [section](/developing-extensions/creating-deleting-and-modifying-elements#creating-a-model-element-and-a-view-element-at-once) for more detail.

Toolbox will pass `options` object to the command. The passed `options` parameter contains:

* `diagram` : The active diagram.
* `id` : The identifier of tool item.
* `x1`, `y1`, `x2`, `y2` : The user dragged area on the diagram.
* ... : `command-arg` are combined.

{% code title="main.js" %}

```javascript
function handleAddElement (options) {
  options = Object.assign(options, {
    'model-init': {
      'stereotype': options.stereotype
    },
    'view-init': {
      'stereotypeDisplay': 'icon',
      'suppressAttributes': true,
      'suppressOperations': true
    }
  })
  return app.factory.createModelAndView(options)
}

app.commands.register('my:add-element', handleAddElement)
```

{% endcode %}


# Accessing Elements

In this chapter, we're going to learn how to access elements. Before you read this chapter, you need to have clear understanding of the difference between software model and diagram as well as model elements and view elements. If you don't know about this, please read [Basic Concepts](/user-guide/basic-concepts) first.

In the following sections, we will use an example software model as shown in the below figure. Actual model file can be obtained from here: <https://github.com/staruml/staruml-dev-docs/blob/master/samples/Book.mdj>. There are two classes **Book** and **Author** and a association **wrote** connecting between the two classes. In addition, there is a diagram named **Main** which containing three view elements, each corresponds to **Book**, **Author**, **wrote** respectively. All these elements and a diagram are contained by a model named **Model** which is also contained by the top-level project element named **Book Sample**.

![Book Sample](https://github.com/staruml/staruml-dev-docs/blob/master/images/Book-sample.png?raw=true)

## Getting a top-level project

First we will access to the top-level project element. The top-level project element can be obtained by using `app.project`.

```javascript
var project = app.project.getProject()
console.log(project.name) // "Book Sample"
```

> **Note**
>
> all Javascript code examples can be executed in console (select **Debug > Show DevTools** and then click **Console** tab).

The obtained element is just a Javascript object, so you can access to any fields such as `project.name` or `project.ownedElements[0]`. Printing the element itself in console like `console.log(project)` is helpful to get all information about the element.

## Inspecting elements

Then, how can we know which classes of elements are available and which attributes or operations are available for each class of elements? You can find documentations of the metamodel at [Metamodel documentation](https://files.staruml.io/api-docs/6.0.0/metamodel/index.html) or additionally at [API Reference](https://files.staruml.io/api-docs/6.0.0/api/index.html).

You can access to any elements via the top-level project. Containment structure is shown in **Explorer** of the above capture image.

```javascript
var model = project.ownedElements[0]
console.log(model.name) // "Model"

var mainDiagram = model.ownedElements[0] 
console.log(mainDiagram.name) // "Main"

var book = model.ownedElements[1]
var author = model.ownedElements[2]
console.log(book.name) // "Book"
console.log(author.name) // "Author"

var association = book.ownedElements[0]
console.log(association.name) // "wrote"
console.log(association.end1.name) // "publications"
console.log(association.end1.multiplicity) // "1..*"
console.log(association.end2.name) // "authors"
console.log(association.end2.multiplicity) // "1..*"

var bookISBN = book.attributes[0]
console.log(bookISBN.name) // "ISBN"
console.log(bookISBN.type) // "String"
console.log(bookISBN.visibility) // "public"
console.log(bookISBN.isID) // true
```

So far we inspected model elements only, now you will see the view elements contained by the diagram **Main**.

```javascript
var bookView = mainDiagram.ownedViews[0]
console.log(bookView.left) // 32
console.log(bookView.top) // 20
console.log(bookView.width) // 114
console.log(bookView.height) // 103
console.log(bookView.fillColor) // "#ffffff"
console.log(bookView.model.name) // "Book"
console.log(bookView.model === book) // true

var authorView = mainDiagram.ownedViews[1]
...
```

Each element has a corresponding Javascript class definition. The class definitions are in a global variable `type`.

```javascript
console.log(project instanceof type.Project) // true
console.log(model instanceof type.UMLModel) // true
console.log(mainDiagram instanceof type.UMLClassDiagram) // true
console.log(book instanceof type.UMLClass) // true
console.log(bookISBN instanceof type.UMLAttribute) // true
console.log(association instanceof type.UMLAssociation) // true
console.log(bookView instanceof type.UMLClassView) // true
```

##

## Retrieving elements by query

Accessing elements from the top-level project is very inconvenient and tedious. How can we get all elements of `UMLClass` type? To retrieve elements easily, StarUML provides a very simple select expression. Followings are several examples of select expression.

```javascript
app.repository.select("@Project")
// returns elements of type.Project: [Project]

app.repository.select("@UMLClass")
// returns elements of type.UMLClass: [Book, Author]

app.repository.select("Model::Book")
// returns elements named "Book" contained by an element named "Model": [Book]

app.repository.select("Book.attributes")
// returns elements in 'attributes' field of an element named "Book": [ISBN, title, summary, publisher]

app.repository.select("@UMLAttribute[type=String]")
// returns elements of type.UMLAttribute only if whose 'type' field has "String" value: [ISBN, title, summary, publisher, name, biography]
```

You can make a query expression to select elements with the five selectors.

### Name Selector (N)

Select elements which has name specified by `N` (equivalent to value selector `[name=N]`).

Examples:

* `Class1` : All elements named by "Class1".
* `Class1::Attribute1` : All elements named by "Attribute1" only in the child elements of the element named by "Class1".

### Children Selector (P::)

Select all child elements of the element `P`.

&#x20;Examples:

* `Package1::` : All child elements of the element named by "Package1".
* `Package1::@UMLClass` : All elements of type "UMLClass" only in the child elements of the element named by "Package1".

### Type Selector (@T)

Select all elements of type `T`.

Examples:

* `@UMLInterface` : All elements of type "UMLInterface".
* `@UMLClassifier` : All elements of type "UMLClassifier" (includes all descendant types: e.g. UMLClass, UMLInterface, UMLEnumeration, ...).
* `Package1::@UMLClass` : All elements of type "UMLClass" only in the child elements of the element named by "Package1".

### Field Selector (.F)

Select all elements contained in the field `F`.

Examples:

* `Class1.attributes` : All attribute elements contained in `attributes` field of the "Class1" element(s).
* `Package1.ownedElements` : All elements contained in `ownedElements` field of the "Package1" element(s).
* `@UMLClass.operations` : All operation elements contained in `operations` field for all elements of type "UMLClass".

### Value Selector (\[F=V])

Select all elements whose field `F` has value `V`.

Examples:

* `Class1.operations[isAbstract=false]` : All non-abstract (`isAbstract=false`) operations of "Class1" element(s).
* `Class1.attributes[isDerived=true]` : All derived (`isDerived=true`) attributes of "Class1" element(s).


# Creating, Deleting and Modifying Elements

In this chapter, we're going to learn how to create and modify elements. The most important is that you **should not** create or modify elements directly like `var class1 = new UMLClass()` or `class1.name = "New Name"` because all changes should be done via *operations* which supports by undo and redo.

## Creating elements

### Creating a model element

You can call `createModel` function of `app.factory` to create a model element with an option object.

The option object may have following fields:

* `id` : ID of factory function to create an element. To see the full ID list, execute `app.factory.getModelIds()`.
* `parent` : A parent element where the created element to be contained.
* `field` (optional) : Field name of the parent element (default is `ownedElements`).
* `modelInitializer` (optional) : A function to initialize the created model element.

```javascript
// Get a reference to top-level project
var project = app.repository.select("@Project")[0]

// Create a UMLModel element as a child of project
var model1 = app.factory.createModel({ id: "UMLModel", parent: project })

// Create a UMLClass element as a child of the model
var class1 = app.factory.createModel({ id: "UMLClass", parent: model1 })

// Create a UMLAttribute element and add to the field 'attributes' of the class
var attr1 = app.factory.createModel({ id: "UMLAttribute", parent: class1, field: "attributes" })

// Create a UMLClass with options
var options = {
  id: "UMLClass",
  parent: model1,
  modelInitializer: function (elem) {
    elem.name = "MyClass";
    elem.isAbstract = true;
  }
}
var class2 = app.factory.createModel(options);
```

You can see the created elements in **Model Explorer** and undo and redo are available for each creation.

### Creating a diagram

Call `createDiagram` function of `app.factory` to create a diagram with an option object:

The option object may have following fields:

* `id` : ID of Factory function to create a diagram. To see the full ID list, execute `app.factory.getDiagramIds()`.
* `parent` : A parent element where the created diagram to be contained.
* `options` (optional) : An object containing the below options.
* `diagramInitializer` (optional) : A function to initialize the created diagram.

```javascript
// Get a reference to top-level project
var project = app.repository.select("@Project")[0]

// Create a UMLModel element as a child of project
var model1 = app.factory.createModel({ id: "UMLModel", parent: project })

// Create a UMLClassDiagram as a child of the model
var diagram1 = app.factory.createDiagram({ id: "UMLClassDiagram", parent: model1 })

// Create a UMLClassDiagram with options
var options = {
  id: "UMLClassDiagram",
  parent: model1,
  diagramInitializer: function (dgm) {
    dgm.name = "MyDiagram";
    dgm.defaultDiagram = true;
  }
}
var diagram2 = app.factory.createDiagram(options)
```

### Creating a model element and a view element at once

Call `createModelAndView` function of `app.factory` to create a model element and a view element at once with an option object.

The option object may have following fields:

* `id` : ID of Factory function. To see the full ID list, execute `Factory.getModelAndViewIds()`.
* `parent` : A parent element where the created model element to be contained.
* `diagram` : A diagram element where the created view element to be contained.
* `modelInitializer` (optional) : A function to initialize the created model element.
* `viewInitializer` (optional) : A function to initialize the created view element.
* `x1`, `y1`, `x2`, `y2` (optional) : Rectangle coordinate to initialize position and size of the created view element.
* `tailView`, `headView` (optional) : If you try to create a relationship (e.g. `UMLAssociation`), the created view element connects these two view elements `tailView` and `headView`.
* `tailModel`, and `headModel` (optional) : If you try to create a relationship, the created model element connects these two model elements `tailModel` and `headModel`.
* `containerView` (optional) : A view element where the created view element to be contained.

The function `createModelAndView` returns the created view element, so you need to get the create model element by accessing `model` field. (e.g. `classView1.model`). Following code will create two classes and a association connecting the two classes.

```javascript
// Create a UMLClass and UMLClassView
var options1 = {
  id: "UMLClass",
  parent: diagram1._parent,
  diagram: diagram1,
  x1: 100,
  y1: 100,
  x2: 200,
  y2: 200
}
var classView1 = app.factory.createModelAndView(options1)

// Create another UMLClass and UMLClassView
var options2 = {
  id: "UMLClass",
  parent: diagram1._parent,
  diagram: diagram1,
  x1: 400,
  y1: 100,
  x2: 500,
  y2: 200
}
var classView2 = app.factory.createModelAndView(options2)

// Create an association connecting the two classes
var options3 = {
  id: "UMLAssociation",
  parent: diagram1._parent,
  diagram: diagram1,
  tailView: classView1,
  headView: classView2,
  tailModel: classView1.model,
  headModel: classView2.model
}
var assoView = app.factory.createModelAndView(options3)
```

### Creating a view element of an existing model element

Call `createViewOf` function of `app.factory` to create a view element of an existing model element with an option object.

The option object may have following fields:

* `model` : A model element referenced by the created view element.
* `diagram` : A diagram element where the created view element to be contained.
* `viewInitializer` (optional) : A function to initialize the created view element.
* `x`, `y` (optional) : Position of the created view element.
* `containerView` (optional) : A view element where the created view element to be contained.

```javascript
var options = {
  model: classView1.model,
  diagram: diagram1,
  x: 500,
  y: 500,
}
app.factory.createViewOf(options)
```

You will see the one more class view element at (500, 500).

### Adding tags to an element

If you want to extend an element with additional tags, you can create tags by calling `createModel` function with `Tag` parameter of `app.factory`. There are five kinds of Tag: String, Number, Boolean, Reference, and Hidden. Hidden tags are not shown in diagrams, but other tags are shown as properties. (Check **Format > Show Property** menu). Following code will create a string tag to the selected element.

```javascript
// Get a selected element
var selected = app.selections.getSelected()

// Options for creating a tag
var options = {
  id: "Tag",
  parent: selected,
  field: "tags",
  modelInitializer: function (tag) {
    tag.name = "Tag1";
    tag.kind = type.Tag.TK_STRING; // or TK_BOOLEAN, TK_NUMBER, TK_REFERENCE, TK_HIDDEN
    tag.value = "String Value...";
    // tag.checked = true; // for TK_BOOLEAN
    // tag.number = 100; // for TK_NUMBER
    // tag.reference = ...; // for TK_REFERENCE
  }
}

// Create a tag to the selected element
var tag1 = app.factory.createModel(options)
```

## Deleting elements

To delete some elements, call `app.engine.deleteElements` function with model and view elements as arguments.

```javascript
// Delete selected model elements
var models = app.selections.getSelectedModels()
app.engine.deleteElements(models, [])

// Or, delete selected view elements
var views = app.selections.getSelectedViews()
app.engine.deleteElements([], views)

// Delete all selected model and view elements
var models = app.selections.getSelectedModels()
var views = app.selections.getSelectedViews()
app.engine.deleteElements(models, views)
```

## Modifying elements

### Change property value

You **should not** modify a property of an element directly like `class1.name = "New Name"` because all changes should be done via *operations* which supports by undo and redo.

To change property value, use `app.engine.setProperty()` function as below:

```javascript
// Get a selected element
var selected = app.selections.getSelected()
// Change property value
app.engine.setProperty(selected, 'name', 'New Name')
```

## Examples

### Sequence Diagram

Here is an example to create a Sequence Diagram including two Lifelines and a Message.

```javascript
var project = app.repository.select("@Project")[0]

var model1 = app.factory.createModel({ id: "UMLModel", parent: project })

// Create a Sequence Diagram
var options = {
  id: "UMLSequenceDiagram",
  parent: model1,
  diagramInitializer: function (dgm) {
    dgm.name = "MyDiagram";
  }
}
var diagram1 = app.factory.createDiagram(options)

// Create a Lifeline
var options1 = {
  id: "UMLLifeline",
  parent: diagram1._parent,
  diagram: diagram1,
  x1: 50,
  y1: 20,
  x2: 50,
  y2: 20
}
var lifelineView1 = app.factory.createModelAndView(options1)

// Create another Lifeline
var options2 = {
  id: "UMLLifeline",
  parent: diagram1._parent,
  diagram: diagram1,   
  x1: 150,
  y1: 20,
  x2: 150,
  y2: 20
}
var lifelineView2 = app.factory.createModelAndView(options2)

// Create a Message connecting the above two Lifelines
var options3 = {
  id: "UMLMessage",
  parent: diagram1._parent,
  diagram: diagram1, 
  x1: 50,
  y1: 100,
  x2: 150,
  y2: 100,
  tailView: lifelineView1,
  headView: lifelineView2,
  tailModel: lifelineView1.model,
  headModel: lifelineView2.model
}
var messageView1 = app.factory.createModelAndView(options3)
```


# Working with Selections

In this chapter, we're going to learn how to get selected elements, force to select particular elements, and do something by listening to selection changed events.

## Getting selected elements

Users can select elements in a diagram or in **Model Explorer**. Sometimes we may need to access only the selected elements.

We need to distinguish between **selected views** and **selected models**. If you select the **Book** class in a diagram, then there is a selected view (`UMLClassView`) and a selected model (`UMLClass`). If you select the **Author** class in **Model Explorer**, then there is a selected model (`UMLClass`) and no selected views.

We can access selected elements using `app.selections` as following:

```javascript
var selectedViews = app.selections.getSelectedViews()
var selectedModels = app.selections.getSelectedModels()
var selected = app.selections.getSelected() // === selectedModels[0]
```

## Enforce to select particular elements

To select a model element in **Model Explorer**, use **ModelExplorerView** module. (Assume that `Book.mdj` used in [Accessing Elements](https://github.com/staruml/staruml-gitbook/tree/de0346ed28133c9def39873bb4f98979a1698049/developing-extensions/AccessingElements/README.md) were loaded)

```javascript
var book = app.repository.select("Model::Book")[0]
app.modelExplorer.select(book)
```

To scroll automatically so as to show the element, pass `true` value as the second parameter.

```javascript
app.modelExplorer.select(book, true)
```

To select a view element in diagram, use `app.diagrams`. You can find more functions about selection in [API Reference](http://staruml.io/reference/3.0.0/api).

```javascript
var diagram = app.repository.select("@Diagram")[0]
var view1 = diagram.ownedViews[0]

app.diagrams.selectInDiagram(view1)
```

## Listening selection changed event

Now we will show how to listen and handle a selection change event. An array of selected model elements and an array of selected view elements are passed to the second and the third parameters respectively to the callback function.

```javascript
app.selections.on('selectionChanged', function (models, views) {
  console.log("Selected number of model elements: ", models.length)
  console.log("Selected number of view elements: ", views.length)
})
```


# Defining Preferences

In this chapter, we're going to learn how to define preferences. When you developing your own extensions, you may want to allow users to make preferred settings.

To define your own preferences, use `app.preferences`.

## Defining preference schema

Before we get in detail, it's better to take a look at an example. Following is a part of preference schema of [Java extension](https://github.com/staruml/staruml-java).

```javascript
var javaPreferences = {
  id: "java",
  name: "Java",
  schema: {
    "java.gen": {
      text: "Java Code Generation",
      type: "section"
    },
    "java.gen.useTab": {
      text: "Use Tab",
      description: "Use Tab for indentation instead of spaces.",
      type: "check",
      default: false
    },
    "java.gen.indentSpaces": {
      text: "Indent Spaces",
      description: "Number of spaces for indentation.",
      type: "number",
      default: 4
    },
    ...
  }
}
...
app.preferences.register(javaPreferences)
```

This preference schema will be shown in **Preferences Dialog** as the below image.

![PreferenceDialog](https://github.com/staruml/staruml-dev-docs/blob/master/images/PreferenceDialog.png?raw=true)

As shown in the above example, a preference schema have a *unique ID*, *name*, and a set of *preference items*. You can register a preference schema by `app.preferences.register` function.

A preference item should have the following properties.

* **key** : Unique identifier of preference item. It should be unique in all of the preference schemas, so it's strongly recommend to include all the IDs of preference schema and section (e.g. `java.gen.useTab`, `java.gen.indentSpaces`).
* **text** : Name of preference item. It will be shown in **Preferences Dialog** instead of `key`.
* **description** : Short description of preference item.
* **type** : Type of preference item. Available types will be described later.
* **default** : Default value of preference item.
* **width** *(optional)* : Width of widget for preference item in **Preferences Dialog**.&#x20;
* **options** *(optional)* : Options users can select one of. This property is mandatory for `Combo` or `Dropdown` preference items. This property should be defined as an array of objects having two fields: `value` and `text`. (e.g. `[ { value: 0, text: "female" }, { value: 1, text: "male" } ]` )

Available types of preference item are as follow.

* **section** : Just for grouping preference items, so it has no actual preference value.
* **string** : Allows users can edit a text (a string value).
* **check** : Allows users can check or uncheck (a boolean value).
* **number** : Allows users can edit a number value (an integer value).
* **combo** : Allows users can edit or select a value from the defined options.
* **dropdown** : Allows users can select from the defined options.
* **color** : Allows users can select a color value. This type of preference item allow to set `default` property value to `null`. It means nothing selected. Additionally, allow to define `defaultButton` property like as `defaultButton: { text: "Use Default Color" }`. When it defined, a button is shown in front of color widget in **Preferences Dialog** and changes to default color when it pressed.

## Reading preference values

You can read value of a particular preference item by calling `get` function with key of the preference item. It returns user selected value or default value. If passed undefined key, it returns `null` value.

```javascript
app.preferences.get("java.gen.useTab") // false
app.preferences.get("java.gen.indentSpaces") // 4
app.preferences.get("java.gen.undefined-item") // null
```

## Writing preference values

You can also write value for a particular preference item by calling `set` function with key and value. Note that you have to pass value of correct type conform to the type of preference item. For example, do not pass string value to a preference item of **check** type.

```javascript
app.preferences.set("java.gen.useTab", true)
app.preferences.set("java.gen.indentSpaces", 2)
app.preferences.get("java.gen.useTab") // true
app.preferences.get("java.gen.indentSpaces") // 2
```


# Using Dialogs

In this chapter, we're going to learn how to use dialogs.

## File Dialogs

You can use **Open Dialog** and **Save Dialog** to allow users to choose files or directories.

Following is an example of **Open Dialog** for choosing a text `*.txt` file.

```javascript
var filters = [
  { name: "Text Files", extensions: [ "txt" ] }
]
var selected = app.dialogs.showOpenDialog("Select a text file...", null, filters)
// Returns an array of paths of selected files
```

Following is an example of **Save Dialog** for getting a file name.

```javascript
var filters = [
  { name: "Text Files", extensions: [ "txt" ] }
]
var selected = app.dialogs.showSaveDialog("Save text as...", null, filters)
// Returns a file path to save
```

## Message Dialogs

There are three types of message dialogs to show error, alert, and info.

```javascript
// Error Dialog
app.dialogs.showErrorDialog("This is error message.")

// Alert Dialog
app.dialogs.showAlertDialog("This is alert message.")

// Info Dialog
app.dialogs.showInfoDialog("This is info message.")
```

## Input Dialogs

Here are code examples to show dialogs to get user inputs.

**Input Dialog** (single line text)

```javascript
app.dialogs.showInputDialog("Enter your name.").then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log("Your name is", returnValue)
  } else {
    console.log("User canceled")
  }
})
```

**Text Dialog** (multi line text)

```javascript
app.dialogs.showTextDialog("Enter your biography.", "Edit here...").then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log("Your bio is", returnValue)
  } else {
    console.log("User canceled")
  }
})
```

**Confirm Dialog**

```javascript
var buttonId = app.dialogs.showConfirmDialog("Are you sure?")
```

**Select Radio Dialog**

```javascript
var options = [
  { text: "First", value: 1 },
  { text: "Second", value: 2 },
  { text: "Third", value: 3 }
]
app.dialogs.showSelectRadioDialog("Select one of the following items.", options).then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log(returnValue)
  } else {
    console.log("User canceled")
  }
})
```

**Select Dropdown Dialog**

```javascript
var options = [
  { text: "First", value: 1 },
  { text: "Second", value: 2 },
  { text: "Third", value: 3 }
]
app.dialogs.showSelectDropdownDialog("Select one of the following items.", options).then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log(returnValue);
  } else {
    console.log("User canceled")
  }
})
```

**Color Dialog**

```javascript
// Initial color is red (#ff0000).
app.dialogs.showColorDialog("#ff0000").then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log(returnValue);
  } else {
    console.log("User canceled")
  }
})
```

**Font Dialog**

```javascript
var font = {
  face: "Helvetica",
  size: 20,
  color: "#ff0000"
}
app.dialogs.showFontDialog(font).then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log(returnValue);
  } else {
    console.log("User canceled")
  }
})
```

## Element Dialogs

If you need to ask users to pick an model element, **Element Picker Dialog** can be used as follow:

```javascript
app.elementPickerDialog.showDialog("Select a Class", null, type.UMLClass).then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log("You selected: ", returnValue)
  }
})
```

![ElementPickerDialog](https://github.com/staruml/staruml-dev-docs/blob/master/images/ElementPickerDialog.png?raw=true)

Or, you may need to constrain a list of elements which can be selected by users. Then you can use **Element List Picker Dialog**.

```javascript
var classes = app.repository.select("@UMLClass")
var dlg = app.elementListPickerDialog.showDialog("Select a set of Class", classes).then(function ({buttonId, returnValue}) {
  if (buttonId === 'ok') {
    console.log("You selected: ", returnValue)
  }
})
```

![ElementListPickerDialog](https://github.com/staruml/staruml-dev-docs/blob/master/images/ElementListPickerDialog.png?raw=true)

## Toast

**Toast** is a way to show a short message in some seconds. It appears on the top of diagram area and disappears automatically after some seconds.

```javascript
app.toast.error("This is an error message") // Red color
app.toast.warning("This is a warning message") // Yellow color
app.toast.info("This is an info message") // Black color
```


# Registering to Extension Registry

When you complete your extension development, you can register your extension to **Extension Registry** so that users can install your extension easily via **Extension Manager**.

## First Registration

If you created your own extension and want to release the first version, then please follow the below steps.

### Create `package.json`

Create a `package.json` file. `name` field is a unique identifier for the extension. We recommend to combine your Github id and repository name. For example, if your Github id is `john` and the repository name is `sql-generator`, then `john.sql-generator` could be good for `name` field. `version` field has to be set carefully. Recommend to follow [Semantic Versioning](http://semver.org/).

> Note that `name` field should be lowercase alpha-numeric name without spaces. It may include "." or "\_" or "-" characters.

Following is an example for Java extension.

```javascript
{
    "name": "staruml.java",
    "title": "Java",
    "description": "Java code generation and reverse engineering.",
    "homepage": "https://github.com/staruml/Java",
    "issues": "https://github.com/staruml/Java/issues",
    "keywords": ["java"],
    "version": "0.9.0",
    "author": {
        "name": "Minkyu Lee",
        "email": "niklaus.lee@gmail.com",
        "url": "https://github.com/niklauslee"
    },
    "license": "MIT",
    "engines": {
        "staruml": ">=3.0.0"
    }
}
```

### Write README.md

Please write information and user manual of your extension in `README.md` file.

### Upload to Github

Upload your extension source codes to a Github repository. Only Github is supported, so others (e.g. Bitbuckets, etc.) are not supported. When user install an extension, then **Extension Manager** downloads extension directly from the Github repository.

### Create a release

Finally, you have to create a release in the Github repository as described in <https://help.github.com/articles/creating-releases/>. This is very important. Without this, extensions cannot be downloaded from **Extension Manager**. The `tag version` and `release title` should be matched with the `version` field in the `package.json` file.

### Send email

After creating a release, just send email to us (`support@staruml.io`) with your extension repository URL. Then, we will register your extension to **Extension Registry** within one or two business days.

## Upgrading to New Version

If you want to release a new version of your extension already registered in **Extension Registry**. Please check the followings.

### Check `version` in `package.json`

Set new version number in `version` field in `package.json`.

### Create a new release

You have to create a release for every version. Check again that the `tag version` and `release title` are matched with the `version` field in the `package.json` file.

### Send email.

After creating a new release, just let us know that new version is released by sending email to us (`support@staruml.io`). We will upgrade your extension to the new version within one or two business days.


# Introduction

StarUML is a sophisticated software modeler aimed to support *agile* and *concise* modeling.

![StarUML](/files/mys2CNzqsdhnV5vsw936)

The main targets of users are:

* Agile and small development teams
* Professional persons
* Educational institutes

The key features of StarUML are:

* Multi-platform support (MacOS, Windows and Linux)
* UML 2.x standard compliant
* SysML support
* Entity-Relationship diagram (ERD)
* Data-flow diagram (DFD)
* Flowchart diagram
* Multiple windows
* Modern UX
* Dark and light themes
* Retina (High-DPI) display support
* MacPro Pro's Touch Bar support
* Model-driven development
* Open APIs
* Various third-party extensions
* Asynchronous model validation
* Export to HTML docs
* Automatic updates.


# Introduction

StarUML is a sophisticated software modeler aimed to support *agile* and *concise* modeling.

![StarUML](/files/mys2CNzqsdhnV5vsw936)

The main targets of users are:

* Agile and small development teams
* Professional persons
* Educational institutes.

The key features of StarUML are:

* Multi-platform support (MacOS, Windows and Linux)
* UML 2.x standard compliant
* SysML support
* Entity-Relationship diagram (ERD)
* Data-flow diagram (DFD)
* Flowchart diagram
* Multiple windows
* Modern UX
* Dark and light themes
* Retina (High-DPI) display support
* MacPro Pro's Touch Bar support
* Model-driven development
* Open APIs
* Various third-party extensions
* Asynchronous model validation
* Export to HTML docs
* Automatic updates.


# Basic Concepts

## Project

**Project** is a top-level element stored as a single file (`.mdj`).

Modeling a software system requires describing multiple models because it is not enough to describe the system with a single perspective, so we typically make multiple models such as *Use-Case Model*, *Design Model*, *Component Model*, *Deployment Model*, or others in a *Project*.

Typically **Project** is organized as a set of *UMLModels*, *UMLPackages*, or *UMLSubsystems*. If you want to know more about UML Elements, please refer to OMG UML Specification.

## Model vs View

Many users are confusing the difference between **diagramming or drawing** tools such as Microsoft Visio and **modeling** tools such StarUML or Rational Software Architect. First you need to understand a diagram is not a model.

**Model** or **software model** is a description of any aspect of a software system such as structure, behavior, requirement, and so on. A software model can be represented in textual, mathmatical or visual form. A **Model element** is a building block of a software model.

A **Diagram** is a visual geometric symbolic representation of a software model. A software model can be represented in one or more diagrams with different aspects. For example, a diagram can focus on class hierarchical structure while another diagram can focus on interaction between objects. Diagrams consists of **view elements**, which are visual representations of a **model element**.

A **model element** may have multiple corresponding **view elements**. A model element has its own data such as *name*, *stereotype*, *type*, etc. A view element just renders the corresponding model element in a diagram. View elements may exists multiple times in a diagram or in different diagrams. If the *name* of a model element changed, all corresponding view elements reflect the changes in their diagrams.

## Fragment

A **fragment** is a part of a project saved as a separate file with the extension name `.mfj`. Any element can be exported as a fragment, but typically **UMLPackage**, **UMLModel**, and **UMLSubsystem** are the candidates. Once a fragment is exported as a file, the fragment can be reused by importing in a project.

> **See also**
>
> [Import Fragment](/v6/user-guide/managing-project#import-fragment) - To import a fragment file
>
> [Export Fragment](/v6/user-guide/managing-project#export-fragment) - To export an element to a fragment file

## Profile

UML (Unified Modeling Language) is a general-purpose modeling language that could be used to express any kinds of software-intensive systems. In this reason, using UML for a specific domain or platform is not sufficient, so you may need to define UML Profile. StarUML provides UML profiles which can be used to expand UML. For example, UML profiles can be used for the following purposes.

* Profiles for specific programming languages (C/C++, Java, C#, Python, etc.)
* Profiles for specific development methodologies (RUP, Catalysis, UML Components, etc.)
* Profiles for specific domains (EAI, CRM, SCM, ERP, etc.)

## Extension

An extension is a package which adds new features to StarUML. For example, an extension can extend menus, UIs, dialogs, modeling notations, preferences, etc. An extension can be written in JavaScript, CSS3, and HTML5 and can use Node.js integrated in StarUML. Extensions can be easily installed, uninstalled, and updated via the main extension registry.

> **See also**
>
> [Managing Extensions](/v6/user-guide/managing-extensions) - To use extensions.


# Managing Project

## New Project

To create a modeling project, press `Ctrl+N` or select **File | New**.

## New Project from Template

You can start a modeling project by selecting a template. To start a project with a template, select **File | New From Template | \[TemplateName]**. StarUML supports 4 default templates:

* **UMLMinimal** - A single model with UML Standard Profile.
* **UMLConventional** - Use Case Model, Analysis Model, Design Model, Implementation Model, and Deployment Model with UML Standard Profile.
* **4+1 View Model** - Pilippe Kruchten's [4+1 Architectural View Model](http://en.wikipedia.org/wiki/4%2B1_architectural_view_model).
* **Rational** : Approach of Rational Rose Tool.
* **Data Model** : A simple data modeling project.

If you don't want to use pre-defined templates, you need to make your own project structure.

## Open Project

If you have model files (`.mdj`), you can open it in StarUML. To open a model file, press `Ctrl+O` or select **File | Open...** and then select a file in **Open Dialog**.

## Open StarUML V1 File

If you have StarUML V1 model files (`.uml`), you can import by selecting **File | Import | StarUML 1 File (.uml)...**.

## Save Project

You can save the working project into a file by pressing `Ctrl+S` or selecting **File | Save**. If you want to save as another file, press `Ctrl+Shift+S` or select **File | Save As...**.

## Close Project

To close working project, select **File | Close**. If you didn't saved the project, you will be asked to save or not.

## Export Fragment

To export a part of the project as a fragment, select **File | Export | Fragment...** and then select an element to export in **Element Picker Dialog**.

## Export HTML docs

To export the project as a set of HTML documents, select  **File | Export | HTML Docs...** menu item.

## Import Fragment

To import a fragment into the project, select **File | Import | Fragment...**. The fragment will be included as a child of the project.

## Applying Profiles

To include UML Standard Profile, select **Model | Apply Profile | UML Standard Profile (v2)** in Menu Bar.


# Managing Diagrams

## Create Diagram

To create a Diagram:

1. Select first an element where a new Diagram to be contained as a child in **Model Explorer**.
2. Select **Model | Add Diagram | \[DiagramType]** in Menu Bar or select **Add Diagram | \[DiagramType]** in Context Menu.

## Delete Diagram

To delete a Diagram:

1. Select a Diagram to delete in **Model Explorer**.
2. Press `Ctrl+Delete` or select **Edit | Delete from Model** in Menu Bar or **Delete from Model** in Context Menu.

## Open Diagram

To open a diagram, double-click a diagram in **Model Explorer**.

To open a sub-diagram of a model element, select a model element which contains a diagram as a child and then press `Ctrl+Shift+D` or select **Edit | Open Sub-Diagram**.

## Close Diagram

To close a diagram, click the close icon (`x` mark) of a diagram in **Working Diagrams** or press `F4` or select **View | Close Diagram** in Menu Bar.

To close other diagram except an active diagram, press `Ctrl+F4` or select **View | Close Other Diagrams** in Menu Bar.

To close all diagrams, press `Shift+F4` or select **View | Close All Diagrams** in Menu Bar.

## Change Active Diagram

To change active diagram, select a diagram in **Working Diagram**.

To activate the next diagram, press `Ctrl+Shift+]` or select **View | Next Diagram**.

To activate the previous diagram, press `Ctrl+Shift+[` or select **View | Previous Diagram**.


# Diagram Editor

## Scroll Diagram

You can scroll diagram by typical mouse wheel or touch pad scroll gestures. Typically mouse wheel scrolls vertical and mouse wheel with `Shift` key scrolls horizontal.

You can also scroll diagram by dragging with mouse middle button (wheel button).

Or you can also scroll diagram by mouse left button dragging while pressing `Control` key (`Command` for Mac) in Diagram Editor.

## Minimap

Minimap shows the entire diagram and the focusing area of the diagram. Clicking a point on the Minimap will scroll the diagram to the clicked point.

To hide or show the Minimap, toggle by press `Ctrl+Alt+M` (`Cmd+Opt+M`)or select **View | Minimap** in Menu Bar or click Minimap icon in **Toolbar**.&#x20;

## Select Views

You can select views only in select mode (Click cursor icon on **Toolbox** or `ESC` key).

To select a single element, click the element with mouse left button.

To select multiple elements, drag an area including elements with mouse left button.

To select additional element, click the element with mouse left button and `Shift` key.

To select additional multiple elements, drag an area including elements with mouse left button and `Shift` key.

## Move Views

You can move the selected views by 1 pixel using the `Arrow` keys. Alternatively, `Shift+Arrow` keys move the selected views by the grid size.

## Zoom In and Out

To zoom in the diagram, press `Ctrl++` (`Cmd++`) or select **View | Zoom In** in Menu Bar.

To zoom out the diagram, press `Ctrl+-` (`Cmd+-`) or select **View | Zoom Out** in Menu Bar.

To set zoom level to actual size, press `Ctrl+0` (`Cmd+0`) or select **View | Actual Size** in Menu Bar.

To fit zoom level to window and scroll to the center of window, press `Ctrl+9` `(Cmd+9)` or select **View | Fit to Window** in Menu Bar.

You can also zoom in-and-out using mouse wheel with `Ctrl` or `Cmd` key.

You can check the current zoom level in **StatusBar**.


# Editing Elements

## Editing Elements

### Create Element

You have following options to create Model Elements and View Elements.

To create an Element from **Toolbox**:

1. Select **\[ElementType]** in **Toolbox**.
2. Drag on the diagram as the size of element, or link two elements if the element is a kind of relationship.

> **Note**
>
> In most cases, creating an element from **Toolbox** means creating the both Model Element and View Element. For example, if you create a Class in a Diagram from Toolbox, a Class Model Element and a Class View Model which referencing the Model Element will be created. See [Basic Concepts](/v6/user-guide/basic-concepts)

If you have already *Model Elements*, you can create *View Elements* referencing the *Model Element* on a *Diagram*.

To create a *View Element* by drag and drop:

1. Select a Model Element in **Explorer**.
2. Drag the Model Element and drop on a Diagram.

To create a *Model Element* in **Explorer**:

1. Select first an element where a new Model Element to be contained as a child in **Explorer**.
2. Select **Model | Add | \[ElementType]** in Menu Bar or select **Add | \[ElementType]\`** in Context Menu.

### Delete Elements

> **See also**
>
> [Basic Concepts](/v6/user-guide/basic-concepts) - Before deleting elements, you need to distinguish the difference of Model Element, View Element, and Diagram.

To delete View Elements in a Diagram.

1. Select View Elements to be deleted in a Diagram.
2. Press `Delete` or Select **Edit | Delete** in Menu Bar or **Delete** in Context Menu.

> **Note**
>
> Deleting View Elements do not delete Model Elements.

To delete Model Elements:

1. Select Elements to be deleted in a Diagram or in **Explorer**.
2. Press `Ctrl+Delete` or Select **Edit | Delete from Model** in Menu Bar or **Delete from Model** in Context Menu.

> **Note**
>
> Model Elements are always deleted with corresponding View Elements.

### Select Elements

To select view elements in **Diagram Editor**:

You can select an Element in Diagram just by clicking on an Element. If you want to select additional elements while keeping current selections, click on element with pressing `Shift`. When you drag an area, Elements overlaps the area will be selected. Pressing `Shift` also work with dragging.

If you want to select all elements in the Diagram, press `Ctrl+A` or select **Edit | Select All** in Menu Bar or **Select All** in Context Menu.

> **Note**
>
> Selecing an Element on a Diagram means selection of the both Model Element and View Element.

To select a model element in **Explorer**:

In **Explorer**, you can select a Model Element by clicking on an Element.

If you want to select an element in **Explorer** corresponding to the a selected element in Diagram, press `Ctrl+E` or select **Edit | Select In Explorer** in Menu Bar or **Select In Explorer** in Context Menu.

### Copy and Paste

When copying or cutting elements for pasting, a clear distinction has to be made between model elements and view elements. If a model element is copied, it has to be pasted under a model element. In this case, all the sub-elements contained in the selected element are copied together. View elements can be copied within the same diagram or to different diagrams. Copied view elements can be pasted in diagrams only; they cannot be pasted to model elements. Copying and pasting may also be restricted depending on the view element types and diagram types.

To copy and paste view elements in **Diagram Editor**

1. Select view elements in a diagram to copy. (You can select multiple elements. See [Select Elements](/v6/user-guide/editing-elements#select-elements))
2. Press `Ctrl+C` or select **Edit | Copy** in Menu Bar or **Copy** in Context Menu. (To cut view elements, press `Ctrl+X` or select **Edit | Cut** in Menu Bar or **Cut** in Context Menu)
3. Open the diagram where the copied view elements to be pasted. (See open diagram??)
4. Press `Ctrl+V` or select **Edit | Paste** in Menu Bar or **Paste** in Context Menu. The copied view elements will be pasted to the active diagram.

To copy and paste a model element in **Explorer**:

1. Select a model element to copy in **Explorer**.
2. Press `Ctrl+C` or select **Edit | Copy** in Menu Bar or **Copy** in Context Menu. (To cut view elements, press `Ctrl+X` or select **Edit | Cut** in Menu Bar or **Cut** in Context Menu)
3. Select a model element where the copied element will be pasted in **Explorer**.
4. Press `Ctrl+V` or select **Edit | Paste** in Menu Bar or **Paste** in Context Menu. The copied view elements will be pasted to the active diagram. The copied model element can be pasted in where an element is able to contain.

> **Note**
>
> Some elements are not allowed to copy, cut, and paste.

### Undo and Redo

To undo an action, press `Ctrl+Z` or select **Edit | Undo** in Menu Bar.

To redo an undo-ed action, press `Ctrl+Y` or select **Edit | Redo** in Menu Bar.

### Edit Properties

You can edit properties of model elements in **Property Editor**.

### Documenting Elements

You can edit documentation of model elements in **Documentation Editor**.

## Extending Elements

### Assign Stereotype

To assign defined stereotype to elements (e.g. defined in UML Standard Profile):

1. Select model elements to assign stereotype.
2. Click the magnifier icon on the right side of `stereotype` property in **Property Editor**.
3. Select a stereotype in **Element Picker Dialog**.

To assign temporal stereotype to elements:

1. Select model elements to assign stereotype.
2. Enter stereotype name in `stereotype` property in **Property Editor**.

### Add Constraints

To add a Constraint to an element:

1. Select model elements to add a constraint.
2. Select **Model | Add | Constraint** in Menu Bar or select **Add | Constraint** in Context Menu.
3. Edit constraint in `specification` property in **Property Editor**.

### Add Tags

Tag is an element to add extended properties to Model Elements

To add a Tag to an element:

1. Select an Element in **Explorer** or in a Diagram.
2. Select **Model | Add | Tag** in Menu Bar or select **Add | Tag** in Context Menu.

Properties of Tag:

* `name` : Name of Tag
* `kind` : Kind of Tag. `kind` could be one of `string`, `reference`, `boolean`, `number`, or `hidden`. if `hidden` is chosen, this Tag will not be shown on View Element.
* `value` : Value of Tag when `kind` is `string`.
* `reference` : Reference value of Tag when `kind` is `reference`.
* `checked` : Boolean value of Tag when `kind` is `boolean`.
* `number` : Number value of Tag when `kind` is `number`.

To show or hide Tags on View Elements, see [Show Property](/v6/user-guide/formatting-diagram#show-property).

## Finding Model Elements

To find model elements by keyword:

1. Press `Ctrl+F` or Select **Model | Find...** in Menu Bar.
2. Enter keyword in Edit Box.
3. Check **Case sensitive** if you want to find keyword case sensitively, and check **Find in documentation** if you want to find keyword in documentation of elements.
4. Matched elements will be shown on a Bottom Panel.


# Formatting Elements

## Change Font

To change font face, size, and color of view elements:

1. Select view elements in diagram.
2. Show **Font Dialog** by pressing `Ctrl+Shift+F` or selecting **Format | Font...** in Menu Bar or Context Menu.
3. Select font face, size or color and press **OK** button.

![Font Dialog](/files/JzqnIB2hn2jOkfKY8ueQ)

You can also use **Style Editor** to change Font face, size, and color.

## Change Line Color

To change line color of view elements:

1. Select view elements in diagram.
2. Show **Color Dialog** for line color by pressing `Ctrl+Shift+L` or selecting **Format | Line Color...** in Menu Bar or Context Menu.
3. Select line color and press **OK** button.

![Color Dialog](/files/0vjYxhYF9TnIK39RkRYy)

You can also use **Style Editor** to change line color.

## Change Fill Color

To change fill color of view elements:

1. Select view elements in diagram.
2. Show **Color Dialog** for fill color by pressing `Ctrl+Shift+I` or selecting **Format | Fill Color...** in Menu Bar or Context Menu.
3. Select fill color and press **OK** button.

You can also use **Style Editor** to change fill color.

## Change Line Style

![](/files/-LAqLiBegC04kXn6TiwJ)

To change line style of view elements:

1. Select view elements in diagram.
2. Select one of line styles.
   * Rectilinear - Press `Ctrl+L` or select **Format | Line Style | Rectilinear** in Menu Bar or Context Menu.
   * Oblique - Press `Ctrl+B` or select **Format | Line Style | Oblique** in Menu Bar or Context Menu.
   * RoundRect - Press `Ctrl+Alt+L` or select **Format | Line Style | RoundRect** in Menu Bar or Context Menu.
   * Curve - Press `Ctrl+Alt+B` or select **Format | Line Style | Curve** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Auto Resize

To set view elements always resize automatically:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+R` or check (or uncheck) **Format | Auto Resize** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Inherit Style

Typically the style (font, color, etc.) of attributes and operations is inherited from the class view. If you want to set different style of some attributes or operations from the class, turn off the inherit style property.

To set inherit style of view elements:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+K` or check (or uncheck) **Format | Inherit Style** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Word Wrap

To allow text can be shown in multiple lines:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+W` or check (or uncheck) **Format | Word Wrap** in Menu Bar or Context Menu.

## Stereotype Display

An element has six alternative representations based on the stereotype. To change stereotype display:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+0` \~ `Ctrl+Shift+5` or select **Format | Stereotype Display | \[StereotypeDisplayKind]** in Menu Bar or Context Menu.

Supported stereotype display kinds are follow:

* None (`Ctrl+Shift+0`) : Do not show stereotype.
* Label (`Ctrl+Shift+1`) : Show stereotype as a label.
* Decoration (`Ctrl+Shift+2`) : Show stereotype as a decorated icon on the top left.
* Decoration with Label (`Ctrl+Shift+3`) : Show stereotype as a label with a decorated icon.
* Icon (`Ctrl+Shift+4`) : Show element as a icon.
* Icon with Label (`Ctrl+Shift+5`) : Show element as a icon with label.

![](/files/-LAqLiSpqhEoxer85Lm0)

## Show Visibility

To show (or hide) visibilities:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+V` or check (or uncheck) **Format | Show Visibility** in Menu Bar or Context Menu.

## Show Namespace

To show (or hide) namespace:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+N` or check (or uncheck) **Format | Show Namespace** in Menu Bar or Context Menu.

## Show Property (Tag)

To show (or hide) properties (tags):

1. Select view elements in diagram.
2. Press `Ctrl+Shift+P` or check (or uncheck) **Format | Show Property** in Menu Bar or Context Menu.

## Show Type

To show (or hide) types:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+Y` or check (or uncheck) **Format | Show Type** in Menu Bar or Context Menu.

## Show Multiplicity

To show (or hide) multiplicities:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+M` or check (or uncheck) **Format | Show Multiplicity** in Menu Bar or Context Menu.

## Show Operation Signature

To show (or hide) operation signature:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+G` or check (or uncheck) **Format | Show Operation Signature** in Menu Bar or Context Menu.

## Suppress Attributes

To suppress attributes:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+A` or check (or uncheck) **Format | Suppress Attributes** in Menu Bar or Context Menu.

## Suppress Operations

To suppress operations:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+O` or check (or uncheck) **Format | Suppress Operations** in Menu Bar or Context Menu.

## Suppress Receptions

To suppress receptions:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+E` or check (or uncheck) **Format | Suppress Receptions** in Menu Bar or Context Menu.

## Suppress Literals

To suppress literals:

1. Select Enumeration view elements in diagram.
2. Press `Ctrl+Shift+T` or check (or uncheck) **Format | Suppress Literals** in Menu Bar or Context Menu.

## Suppress Columns

To suppress columns:

1. Select Entity view elements in diagram.
2. Press `Ctrl+Shift+U` or check (or uncheck) **Format | Suppress Columns** in Menu Bar or Context Menu.

## Aligning View Elements

To bring view elements on the front:

1. Select view elements in diagram.
2. Select **Format | Alignment | Bring to Front** in Menu Bar or **Alignment | Bring to Front** in Context Menu.

Or, to send view elements to the back:

1. Select view elements in diagram.
2. Select **Format | Alignment | Send to Back** in Menu Bar or **Alignment | Send to Back** in Context Menu.

And, you can align two or more view elements:

1. Select view elements in diagram.
2. Select **Format | Alignment | \[AlignmentKind]** in Menu Bar or **Alignment | \[AlignmentKind]** in Context Menu.
   * Align Left : Align selected view elements to the left.
   * Align Right : Align selected view elements to the right.
   * Align Middle : Center selected view elements horizontally.
   * Align Top : Align selected view elements to the top.
   * Align Bottom : Align selected view elements to the bottom.
   * Align Center : Center selected view elements vertically.

## Layout Diagram

To layout diagram automatically:

1. Open the diagram to be layout.
2. Select **Format | Layout | Auto** in Menu Bar.

If you want to layout diagram in a particular direction:

1. Open the diagram to be layout.
2. Select **Format | Layout | \[Direction]** in Menu Bar. Supported directions are **Top to Bottom**, **Bottom to Top**, **Left to Right** and **Right to Left**.


# Annotation Elements

## Text

To create a Text view:

1. Select **Text** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Text.

You can also create a Text view by just double clicking mouse left button on blank area of diagram.

You can enter multiline text by double clicking the Text view element. If you want to add a newline character, press `Shift-Enter`.

You can align texts inside the TextBox (Text, Note) with **Text Alignment** buttons in **Style Editor**.

![Text alignments for textual annotations](/files/-MjrQzdl-ssviG1ZT4lm)

## Text Box

Text Box is a box has text inside. The difference from Text view, it has border line color and fill color.

To create a Text Box view:

1. Select **Text Box** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Text Box.

You can enter multiline text by double clicking the Text Box view element. If you want to add a newline character, press `Shift-Enter`.

## Note and Note Link

To create a Note with Link on a element:

1. Select **Note** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Note.
3. Select **Note Link** in **Toolbox (Annotation)**.
4. Drag on an element and drop on the Note.

You can enter multiline text by double clicking the Note view element. If you want to add a newline character, press `Shift-Enter`.

## Free Line

Free Line is a multi-point line supporting various line formatting including line style, line pattern, and line-end shapes. You can set these line format in **Style Editor**.

![Styles for Free Line element](/files/-Mjr34aLwPCnYZJODiBl)

To create a Free Line view:

1. Select Free**Free Line** in **Toolbox (Annotation)**.
2. Drag from an end-point and drop on another end-point.

## Hyperlink

To create a Hyperlink view:

1. Select **Hyperlink** in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of Hyperlink.

You can enter a link for a model element or a URL. To link a model element, click `reference` property in **Property Editor** and select a model element to link in **Element Picker Dialog**. Or to link a URL, enter full URL in `url` property (e.g. `https://staruml.io`).

To open the URL in `url` or the diagram in `reference` property, double-clicking the Hyperlink.  `http://` or `https://` should be included to open in external web browser by double-clicking the Hyperlink. Link to a local file is not supported. If an element (not a diagram) is in `reference` property, it will be selected in **Model Explorer**.

If you want to show Hyperlink name in the diagram instead of URL or element name, check `showName` property in the **Property Editor**.

## Shapes (Rectangle, Rounded Rectangle, Ellipse)

To create a shape view:

1. Select a shape (**Rectangle, Round Rectangle, Ellipse**) in **Toolbox (Annotation)**.
2. Drag on the diagram as the size of shape.

## Image

You can embed an image file (PNG, JPEG, SVG). We recommend to embed an image smaller than 640x640.

To add an image:

1. Select **Image** in **Toolbox (Annotation)**.
2. Click on the diagram at the point you want to place an image.
3. Select an image file (.png, .jpeg/jpg, .svg) in Open Dialog.

Or, you can add an image by drag an image file and then drop on the diagram area.

You can change the image file by double-clicking on the Image view.


# Managing Extensions

![Extension Manager](/files/AOn9LVbKQrk5gBrFLN9p)

## Install Extension

To install an extension from Extension Registry:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Registry** button.
3. Find an extension to install by search.
4. Press **Install** button of the extension.

To install an extension directly from Github repository:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Install From Url** button.
3. Enter Url of the Github project on input box
4. press **Install** button.

To install an extension manually:

1. Get an extension as a `.zip` file.
2. Extract the file on the extensions path.
   * `/Users/<user>/Library/Application Support/StarUML/extensions/user` for Mac OS.
   * `C:\Users\<user>\AppData\Roaming\StarUML\extensions\user` for Windows.
   * `~/.config/StarUML/extensions/user` for Linux.
3. Check a folder in the extensions path and :file:`main.js` file in the folder.
4. Restart StarUML.

## Uninstall Extension

To uninstall an extension:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Installed** button.
3. Find an extension to uninstall by search.
4. Press **Remove** button of the extension.

To uninstall an extension manually:

1. Go to the extensions path.
   * `/Users/<user>/Library/Application Support/StarUML/extensions/user` for Mac OS.
   * `C:\Users\<user>\AppData\Roaming\StarUML\extensions\user` for Windows.
   * `~/.config/StarUML/extensions/user` for Linux.
2. Remove the extension folder to uninstall.
3. Restart StarUML.

## Update Extension

To update an extension:

1. Show **Extension Manager** by selecting **Tools | Extension Manager...**.
2. Select **Registry** button.
3. **Update** button will be shown if the extension has updates.
4. Press **Update** button of the extension.

To update an extension manually:

1. Uninstall extension of old version manually.
2. Install extension of new version manually.
3. Restart StarUML.


# User Interface

## Main Window

![](/files/5BM1ehchXYTs9TpaUgmD)

### Diagram Area (Diagram Editor)

*Diagram Area (Diagram Editor)* shows the currently selected diagram.

### Sidebar

*Sidebar* is the area left containing *Working Diagrams* panel and *Toolbox*.

To show or hide *Sidebar*, press `Ctrl+1` or check (or uncheck) **View | Sidebar** in Menu Bar.

### Working Diagrams

*Working Diagrams* panel shows a list of the opened working diagram. The selected diagram is shown in the *Diagram Area*.

### Toolbox

*Toolbox* shows elements which can be created in the selected diagram.

To create an element: 1. Select an element in Toolbox 2. Mouse down on the Diagram Area and then drag as the size of the element to be created. If the element is a kind of relationship, connect two elements by drag and drop.

To show or hide *Toolbox*, press `Ctrl+5` or check (or uncheck) **View | Toolbox** in Menu Bar.

### Navigator

*Navigator* is the right area containing *Model Explorer* and *Editors*.

To show or hide *Navigator*, press `Ctrl+2` or check (or uncheck) **View | Navigator** in Menu Bar.

### Model Explorer

*Model Explorer* shows the tree structure of model elements.

You can find an element quickly by search box.

To change the order of elements: 1. Select the dropdown menu in the right up corner of **Model Explorer**. 2. Select one of the sorting types

* Sort by Added
* Sort by Name

To show or hide stereotypes in front of element name by check of uncheck **Show Stereotype Text** in the dropdown menu.

You can expand or collapse all tree nodes by select **Expand All** or **Collapse All** in the dropdown menu.

### Editors (Holder)

Editors (Holder) contains editors to edit properties of model and view elements. It includes *Style Editor*, *Property Editor*, and *Documentation Editor*.

To show or hide *Editors*, press `Ctrl+6` or check (or uncheck) **View | Editors** in Menu Bar.

### Style Editor

*Style Editor* allows to edit styles of selected view elements.

### Property Editor

*Property Editor* allows to edit properties of selected model elements.

### Documentation Editor

*Documentation Editor* allows to edit documentation property of a selected model element.

### Toolbar

*Toolbar* shows tool buttons typically provided from default or installed third-party extensions.

To show or hide *Toolbar*, press `Ctrl+3` or check (or uncheck) **View | Toolbar** in Menu Bar.

### Bottom Panel

*Bottom Panel* is a panel shown below *Diagram Area* typically provided from default or installed third-party extensions including *Find Results*, *Diagram Thumbnails*, *Validation Results*, *Markdown Editor* and etc.

### Statusbar

To show or hide *Statusbar*, press `Ctrl+4` or check (or uncheck) **View | Statusbar** in Menu Bar.

## Dialogs

### Font Dialog

Font Dialog allows to edit font style, size and color for view elements.

![](/files/JzqnIB2hn2jOkfKY8ueQ)

### Color Dialog

Color Dialog allows to edit fill or line color for view elements.

![](/files/0vjYxhYF9TnIK39RkRYy)

### Element Picker Dialog

Element Picker Dialog allows to select an model element from all model elements shown in tree structure. Checking **Do not specify** means nothing selected.

![Element Picker](/files/jHyvBNQCBgaU2R63vznr)

### Element List Picker Dialog

Element List Picker Dialog allows to select an model element from a given list of model elements. Checking **Do not specify** means nothing selected.

![Element List Picker](/files/8LSzjxZYoafvCF1P9FXx)

### Element List Editor Dialog

Element List Editor Dialog is used when user need to select a list of model elements. It allows to add or remove elements from the list and also to modify the order of elements by move up and down.

![Element List Editor](/files/RDE9ffrMenVC1nbaZVfO)

### Print Dialog

Print Dialog allows to configure how to print.

* Print Rage : Select whether all diagrams to be printed or the current diagram to be printed.
* Page Layout : Select page layout is landscape or portait.
* Page Size : Select a proper page size&#x20;
* Show Diagram Name : Select whether diagram name to be printed or not.

![Print Dialog](/files/tXUG8oCL3NH0BElDPNeY)

### Preferences Dialog

Preference Dialog allows to set preferences. Left area shows preference schemas which contains a set of preference items. When you select a preference shema in the left area, then all preference items are shown. If you want to restore default settings, Select **Restore Default Settings** button in the most bottom.

![Preferences Dialog](/files/OV9063U59fP2xuKejgf3)

### Extension Manager Dialog

Extension Manager Dialog allows to install or uninstall extensions from Extension Registry. While **Registry** tab shows all available extensions, while **Installed** tab only shows the installed extension in local.

If you want to install an extension directly from Github URL, Select **Install From Url...** and enter the extension's url.

![Extension Manager](/files/AOn9LVbKQrk5gBrFLN9p)

## Tag Editor

Tag Editor is a convenient tool to manage Tags for an element. It shows all Attributes of the Stereotype assigned to the element, so it is easy to create Tags corresponding Stereotype's Attributes. It also shows all Tags which is not associated with a particular a Stereotype's Attribute. To open Tag Editor, select **Model | Tag Editor...** in Menu Bar or press key `Cmd+T` in macOS or `Ctrl+T` in Windows and Linux.

![Tag Editor](/files/qnBJL2KW6KFZXFJXJL7v)

## Quick Find

Quick Find allows to find a model elements, view element, or a diagram quickly. To popup Quick Find, select **View | Quick Find...** in Menu Bar or press key `Cmd+P` in macOS or `Ctrl+P` in Windows and Linux.

![Quick Find](/files/QuGglTsJPeNtVlxtoNd1)

## Command Palette

Command Palette allows to search and execute commands supported by default or installed extensions. To popup Command Palette, select **View | Command Palette...** in Menu Bar or press key `Cmd+Shift+P` in macOS or `Ctrl+Shift+P` in Windows and Linux.

![Command Palette](/files/ufF9rwZP623lMsHCZRbJ)


# CLI (Command Line Interface)

StarUML can be used as CLI (Command Line Interface) in terminal. With the CLI feature, you can generate various artifacts including source codes, documents (markdown, HTML, etc.), diagram images without launching StarUML GUI. Therefore, you can use CLI in your build script to automate   artifacts generation based on your software model.

## Creating Alias

### MacOS

It is useful to make an alias for StarUML application in terminal as below:

```
$ alias staruml='/Applications/StarUML.app/Contents/MacOS/StarUML'
```

### Windows

You can create an alias for StarUML application in PowerShell as below:

```
PS> Set-Alias -Name staruml -Value 'C:\Program Files\StarUML\StarUML.exe'
```

### Linux

In Linux, you don't need to create alias. If you installed StarUML successfully, you can run with `staruml` in Terminal without additional configuration.

## Commands

You can use four commands in CLI mode. If you omit the supported commands, StarUML will be launched as GUI mode.

You can see what kind of commands are supported by typing with help (`--help`) option.

```shell
$ staruml --help
$ staruml ejs --help    # help for ejs command
$ staruml image --help  # help for image command
$ staruml html --help   # help for html command
$ staruml pdf --help    # help for pdf command
$ staruml exec --help   # help for exec command
```

### ejs

The `ejs` command allow to generate textual artifacts from a user's software model file (.mdj). You can write your own templates with [EJS (Embedded JavaScript templating)](https://ejs.co/). You can find simple examples for EJS at <https://github.com/staruml/staruml-cli-examples>.

You can generate textual artifacts with the below CLI command:

```
$ staruml ejs <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-t`, `--template` : A template file (.ejs) to apply
* option `-o`, `--output` : output file name (default: `output.txt`)
* option `-s`, `--select` : query to select elements (default: `@Project`)

Here is an example to generate a HTML file.

```
$ staruml ejs myproject.mdj \
  -t class-list.ejs \
  -o class-list.html
```

You can generate multiple files with the select option as below:

```
$ staruml ejs myproject.mdj \
  -t java-class.ejs \
  -s @UMLClass \
  -o "out/<%=filenamify(element.name)%>.java"
```

This command selects all classes (UMLClass type) in `myproject.mdj` and then apply the `java-class.ejs` template for each class and save it as a `.java` file with the name of the class. You can get more information about the query expression to select elements at the [retrieving elements by query](/v6/developing-extensions/accessing-elements#retrieving-elements-by-query) section.

Note that you can also use EJS template syntax in the output option. Sometimes the element name cannot be used as a filename (including special characters like `/`, `!`, `#`, `?`, etc.). You can use `filename()` function to convert a string to a legal filename string in output option like `-o "out/<%=filenamify(element.name)%>.java"`.

In EJS template string (in .ejs files or in output option), you can use below variables:

* `app` : The application object. (See [Application Context](/v6/developing-extensions/getting-started#application-context))
* `element` : The element retrieved by the select option.
* `filenamify` : A function convert a string to a legal filename string. (See <https://github.com/sindresorhus/filenamify>)

### image

The `image` command allows you can generate image files for diagrams:

```
$ staruml image <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-f`, `--format` : image file format. One of `png`, `jpeg`, or `svg`. (default: `png`)
* option `-o`, `--output` : output file name.
* option `-s`, `--select` : query to select diagrams (default: `@Diagram`)

Here is an example to export all diagrams as PNG images in `out` folder:

```
$ staruml image myproject.mdj \
  -f png \
  -o "out/<%=filenamify(element.name)%>.png"
```

### html

The `html` command allows you can generate HTML docs for the model file:

```
$ staruml html <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-o`, `--output` : output path. (default: `./html-docs`)

Here is an example to generate HTML docs:

```
$ staruml html myproject.mdj
```

### pdf

The pdf command allows you can generate PDF document for diagrams:

```
$ staruml pdf <file> <options>
```

* `<file>` : A model file (.mdj) to load
* option `-o`, `--output` : output file name. (default: `output.pdf`)
* option `-s`, `--select` : query to select diagrams (default: `@Diagram`)
* option `-z`, `--size` : page size. One of 4A0, 2A0, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, RA0, RA1, RA2, RA3, RA4, SRA0, SRA1, SRA2, SRA3, SRA4, Executive, Folio, Legal, Letter, Tabloid (default: `A4`).
* option `-l`, `--layout` : page layout. `landscape` or `portrait`. (default: `landscape`)
* option `-n`, `--showname` : Show diagram name on page top. `yes` or `no`. (default: `yes`)

Here is an example to generate PDF document (A3-sized portrait) including all diagrams:

```
$ staruml pdf myproject.mdj \
  -o doc.pdf \
  -z A3 \
  -l portrait
```

### exec

The exec command allows you can execute a command:

```
$ staruml exec <file> <options>
```

* `<file>` : A model file (.mdj) to load before executing a command
* option `-c`, `--command` : command id. (e.g. `application:main-log`)
* option `-a`, `--arg` : argument for the command

Here is an example to execute a command:

```
$ staruml exec myproject.mdj \
  --command application:main-log \
  --arg hello
```


# Validation Rules

**(UML001) Name expected.**

* Element should have a name.
* Applies to: `UMLModelElement`.
* Exceptions: `UMLParameter (only if direction === 'return')`, `UMLStructuralFeature (only if type is assigned)`, `UMLDirectedRelationship`, `UMLRelationshipEnd`, `UMLUndirectedRelationship`, `UMLAssociationClassLink`, `UMLRegion`, `UMLPseudostate`, `UMLFinalState`, `UMLControlNode`, `UMLEndpoint`, `UMLGate`, `UMLAction`, `UMLObjectNode`, `UMLImage`, `UMLConnector`.

**(UML002) Name is already defined.**

* If element has a name, then it should be unique in the namespace.
* Applies to: `UMLModelElement`.
* Exceptions: `UMLOperation`.

**(UML003) Conflict with inherited attributes.**

* Applies to: `UMLAttribute`.

**(UML004) Signature conflict.**

* Same signature is not allowed in a classifier.
* Applies To: `UMLOperation`.

**(UML006) Final and leaf element must not have child.**

* If `isFinalSpecifiction` or `isLeaf` is true, then it should not have child.
* Applies to: `UMLClassifier`.

**(UML007) Duplicated generalizations.**

* Do not make duplicated generalizations from the same element.
* Applies to: `UMLClassifier`.

**(UML008) Circular generalizations.**

* Do not generalize from one of the children.
* Applies to: `UMLClassifier`.

**(UML009) Duplicated realizations.**

* Applies to: `UMLClassifier`.

**(UML010) Duplicated role names of associated classifiers.**

* Applies to: `UMLClassifier`.

**(UML011) All attributes and operations of interface must be public.**

* All attributes and operations of an interface should have public visibility.
* Applies to: `UMLInterface`.

**(UML012) Aggregation must be one in an association.**

* Applies to: `UMLAssociation`.

**(UML013) Type of an artifact instance must be an artifact.**

* Applies to: `UMLArtifactInstance`.

**(UML014) Type of a component instance must be a component.**

* Applies to: `UMLComponentInstance`.

**(UML015) Type of a node instance must be a node.**

* Applies to: `UMLNodeInstance`.

**(UML016) A metaclass must have name defined in metamodel.**

* Applies to: `UMLMetaClass`

**(UML017) A stereotype must inherits from stereotype.**

* Applies To: `UMLStereotype`

**(UML018) A stereotype must contained by a profile.**

* Applies To: `UMLStereotype`

**(UML019) An actor only can associate with use cases, components, and classes.**

* Applies To: `UMLActor`

**(UML020) A use case cannot include use cases that directly or indirectly include it.**

* Applies To: `UMLUseCase`

**(UML021) An initial vertex can have at most one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'initial')`

**(UML022) The outgoing transition from an initial vertex must not have a trigger or guard.**

* Applies To: `UMLPseudostate (kind = 'initial')`

**(UML023) History vertices can have at most one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'deepHistory' | 'shallowHistory'`

**(UML024) A join vertex must have at least two incoming transitions and exactly one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'join')`

**(UML025) A fork vertex must have at least two outgoing transitions and exactly one incoming transition.**

* Applies To: `UMLPseudostate (kind = 'fork')`

**(UML026) A junction vertex must have at least one incoming and one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'junction')`

**(UML027) A choice vertex must have at least one incoming and one outgoing transition.**

* Applies To: `UMLPseudostate (kind = 'choice')`

**(UML028) Only submachine states can have connection point references.**

* Applies To: `UMLState`

**(UML029) A state is not allowed to have both a submachine and regions.**

* Applies To: `UMLState`

**(UML030) A region can have at most one initial vertex.**

* Applies To: `UMLRegion`

**(UML031) A region can have at most one deep history vertex.**

* Applies To: `UMLRegion`

**(UML032) A region can have at most one shallow history vertex.**

* Applies To: `UMLRegion`

**(UML033) A final state cannot have any outgoing transitions.**

* Applies To: `UMLFinalState`

**(UML034) A final state cannot have regions.**

* Applies To: `UMLFinalState`

**(UML035) A final state cannot reference a submachine.**

* Applies To: `UMLFinalState`

**(UML036) A final state has no entry behavior.**

* Applies To: `UMLFinalState`

**(UML037) A final state has no exit behavior.**

* Applies To: `UMLFinalState`

**(UML038) A final state has no state (doActivity) behavior.**

* Applies To: `UMLFinalState`

**(UML039) A fork segment must not have guards or triggers.**

* Applies To: `UMLTransition`

**(UML040) A join segment must not have guards or triggers.**

* Applies To: `UMLTransition`

**(UML041) A fork segment must always target a state.**

* Applies To: `UMLTransition`

**(UML042) A join segment must always originate from a state.**

* Applies To: `UMLTransition`

**(UML043) Transitions outgoing pseudostates may not have a trigger (except for those coming out of the initial pseudostate).**

* Applies To: `UMLTransition`

**(UML044) The classifier context of a state machine cannot be an interface.**

* Applies To: `UMLStateMachine`

**(UML045) A decision node has one or two incoming edges and at least one outgoing edge.**

\_ Applies To: `UMLDecisionNode`

**(UML046) A merge node has one outgoing edge.**

* Applies To: `UMLMergeNode`

**(UML047) The edges coming into and out of a merge node must be either all object flows or all control flows.**

* Applies To: `UMLMergeNode`

**(UML048) An initial node has no incoming edges.**

* Applies To: `UMLInitialNode`

**(UML049) Only control edges can have initial nodes as source.**

* Applies To: `UMLInitialNode`

**(UML050) A final node has no outgoing edges.**

* Applies To: `UMLFinalNode`

**(UML051) A fork node has one incoming edge.**

* Applies To: `UMLForkNode`

**(UML052) The edges coming into and out of a fork node must be either all object flows or all control flows.**

* Applies To: `UMLForkNode`

**(UML053) A join node has one outgoing edge.**

* Applies To: `UMLJoinNode`

**(UML054) The edges coming into and out of a join node must be either all object flows or all control flows.**

* Applies To: `UMLJoinNode`

**(UML055) All edges coming into or going out of object nodes must be object flow edges.**

* Applies To: `UMLObjectNode`

**(UML056) Control flows may not have object nodes at either end, except for object nodes with control type.**

* Applies To: `UMLControlFlow`

**(UML057) Object flows may not have actions at either end.**

* Applies To: `UMLObjectFlow`


# Keyboard Shortcuts

## Default Keymaps

| Command                                        | MacOS            | Windows           | Linux             |
| ---------------------------------------------- | ---------------- | ----------------- | ----------------- |
| File > New                                     | `Cmd+N`          | `Ctrl+N`          | `Ctrl+N`          |
| File > Open                                    | `Cmd+O`          | `Ctrl+O`          | `Ctrl+O`          |
| File > Save                                    | `Cmd+S`          | `Ctrl+S`          | `Ctrl+S`          |
| File > Save As                                 | `Cmd+Shift+S`    | `Ctrl+Shift+S`    | `Ctrl+Shift+S`    |
| File > Preferences                             | `Cmd+,`          | n/a               | n/a               |
| File > Quit                                    | `Cmd+Q`          | `Ctrl+Q`          | `Ctrl+Q`          |
| Edit > Undo                                    | `Cmd+Z`          | `Ctrl+Z`          | `Ctrl+Z`          |
| Edit > Redo                                    | `Cmd+Y`          | `Ctrl+Y`          | `Ctrl+Y`          |
| Edit > Cut                                     | `Cmd+X`          | `Ctrl+X`          | `Ctrl+X`          |
| Edit > Copy                                    | `Cmd+C`          | `Ctrl+C`          | `Ctrl+C`          |
| Edit > Copy Diagram As Image                   | `Cmd+Shift+C`    | `Ctrl+Shift+C`    | `Ctrl+Shift+C`    |
| Edit > Paste                                   | `Cmd+V`          | `Ctrl+V`          | `Ctrl+V`          |
| Edit > Delete                                  | `Delete`         | `Delete`          | `Delete`          |
| Edit > Delete from Model                       | `Cmd+Delete`     | `Ctrl+Delete`     | `Ctrl+Delete`     |
| Edit > Move Up                                 | `Cmd+Shift+Up`   | `Ctrl+Shift+Up`   | `Ctrl+Shift+Up`   |
| Edit > Move Down                               | `Cmd+Shift+Down` | `Ctrl+Shift+Down` | `Ctrl+Shift+Down` |
| Edit > Select All                              | `Cmd+A`          | `Ctrl+A`          | `Ctrl+A`          |
| Edit > Select In Explorer                      | `Cmd+E`          | `Ctrl+E`          | `Ctrl+E`          |
| Edit > Select In Diagram                       | `Cmd+D`          | `Ctrl+D`          | `Ctrl+D`          |
| Edit > Open Sub-Diagram                        | `Cmd+Shift+D`    | `Ctrl+Shift+D`    | `Ctrl+Shift+D`    |
| Format > Font                                  | `Cmd+Shift+F`    | `Ctrl+Shift+F`    | `Ctrl+Shift+F`    |
| Format > Fill Color                            | `Cmd+Shift+I`    | `Ctrl+Shift+I`    | `Ctrl+Shift+I`    |
| Format > Line Color                            | `Cmd+Shift+L`    | `Ctrl+Shift+L`    | `Ctrl+Shift+L`    |
| Format > Line Style > Rectilinear              | `Cmd+L`          | `Ctrl+L`          | `Ctrl+L`          |
| Format > Line Style > Oblique                  | `Cmd+B`          | `Ctrl+B`          | `Ctrl+B`          |
| Format > Line Style > RoundRect                | `Cmd+Option+L`   | `Ctrl+Alt+L`      | `Ctrl+Alt+L`      |
| Format > Line Style > Curve                    | `Cmd+Option+B`   | `Ctrl+Alt+B`      | `Ctrl+Alt+B`      |
| Format > Auto Resize                           | `Cmd+Shift+R`    | `Ctrl+Shift+R`    | `Ctrl+Shift+R`    |
| Format > Show Shadow                           | `Cmd+Shift+H`    | `Ctrl+Shift+H`    | `Ctrl+Shift+H`    |
| Format > Inherit Style                         | `Cmd+Shift+K`    | `Ctrl+Shift+K`    | `Ctrl+Shift+K`    |
| Format > Stereotype Display > None             | `Cmd+Shift+0`    | `Ctrl+Shift+0`    | `Ctrl+Shift+0`    |
| Format > Stereotype Display > Label            | `Cmd+Shift+1`    | `Ctrl+Shift+1`    | `Ctrl+Shift+1`    |
| Format > Stereotype Display > Decoration       | `Cmd+Shift+2`    | `Ctrl+Shift+2`    | `Ctrl+Shift+2`    |
| Format > Stereotype Display > Decoration Label | `Cmd+Shift+3`    | `Ctrl+Shift+3`    | `Ctrl+Shift+3`    |
| Format > Stereotype Display > Icon             | `Cmd+Shift+4`    | `Ctrl+Shift+4`    | `Ctrl+Shift+4`    |
| Format > Stereotype Display > Icon Label       | `Cmd+Shift+5`    | `Ctrl+Shift+5`    | `Ctrl+Shift+5`    |
| Format > Word Wrap                             | `Cmd+Shift+W`    | `Ctrl+Shift+W`    | `Ctrl+Shift+W`    |
| Format > Show Visibility                       | `Cmd+Shift+V`    | `Ctrl+Shift+V`    | `Ctrl+Shift+V`    |
| Format > Show Namespace                        | `Cmd+Shift+N`    | `Ctrl+Shift+N`    | `Ctrl+Shift+N`    |
| Format > Show Property                         | `Cmd+Shift+B`    | `Ctrl+Shift+B`    | `Ctrl+Shift+B`    |
| Format > Show Type                             | `Cmd+Shift+Y`    | `Ctrl+Shift+Y`    | `Ctrl+Shift+Y`    |
| Format > Show Multiplicity                     | `Cmd+Shift+M`    | `Ctrl+Shift+M`    | `Ctrl+Shift+M`    |
| Format > Show Operation Signature              | `Cmd+Shift+J`    | `Ctrl+Shift+J`    | `Ctrl+Shift+J`    |
| Format > Suppress Attributes                   | `Cmd+Shift+A`    | `Ctrl+Shift+A`    | `Ctrl+Shift+A`    |
| Format > Suppress Operations                   | `Cmd+Shift+O`    | `Ctrl+Shift+O`    | `Ctrl+Shift+O`    |
| Format > Suppress Receptions                   | `Cmd+Shift+E`    | `Ctrl+Shift+E`    | `Ctrl+Shift+E`    |
| Format > Suppress Literals                     | `Cmd+Shift+T`    | `Ctrl+Shift+T`    | `Ctrl+Shift+T`    |
| Format > Suppress Columns                      | `Cmd+Shift+U`    | `Ctrl+Shift+U`    | `Ctrl+Shift+U`    |
| Model > Find                                   | `Cmd+F`          | `Ctrl+F`          | `Ctrl+F`          |
| View > Quick Find                              | `Cmd+P`          | `Ctrl+P`          | `Ctrl+P`          |
| View > Command Palette...                      | `Cmd+Shift+P`    | `Ctrl+Shift+P`    | `Ctrl+Shift+P`    |
| View > Close Diagram                           | `F4`             | `F4`              | `F4`              |
| View > Close Other Diagrams                    | `Cmd+F4`         | `Ctrl+F4`         | `Ctrl+F4`         |
| View > Close All Diagrams                      | `Shift+F4`       | `Shift+F4`        | `Shift+F4`        |
| View > Next Diagram                            | `Cmd+Shift+]`    | `Ctrl+Shift+]`    | `Ctrl+Shift+]`    |
| View > Previous Diagram                        | `Cmd+Shift+[`    | `Ctrl+Shift+[`    | `Ctrl+Shift+[`    |
| View > Zoom In                                 | `Cmd++`          | `Ctrl++`          | `Ctrl++`          |
| View > Zoom Out                                | `Cmd+-`          | `Ctrl+-`          | `Ctrl+-`          |
| View > Actual Size                             | `Cmd+0`          | `Ctrl+0`          | `Ctrl+0`          |
| View > Fit To Window                           | `Cmd+9`          | `Ctrl+9`          | `Ctrl+Alt+1`      |
| View > Show Grid                               | `Cmd+G`          | `Ctrl+G`          | `Ctrl+G`          |
| View > Snap to Grid                            | `Cmd+Shift+G`    | `Ctrl+Shift+G`    | `Ctrl+Shift+G`    |
| View > Sidebar                                 | `Cmd+1`          | `Ctrl+1`          | `Ctrl+1`          |
| View > Navigator                               | `Cmd+2`          | `Ctrl+2`          | `Ctrl+2`          |
| View > Toolbar                                 | `Cmd+3`          | `Ctrl+3`          | `Ctrl+3`          |
| View > Statusbar                               | `Cmd+4`          | `Ctrl+4`          | `Ctrl+4`          |
| View > Toolbox                                 | `Cmd+5`          | `Ctrl+5`          | `Ctrl+5`          |
| View > Editors                                 | `Cmd+6`          | `Ctrl+6`          | `Ctrl+6`          |
| View > Diagram Thumbnails                      | `Cmd+Option+T`   | `Ctrl+Alt+T`      | `Ctrl+Alt+T`      |
| View > Markdown Documentation                  | `Cmd+Option+D`   | `Ctrl+Alt+D`      | `Ctrl+Alt+D`      |
| View > Minimap                                 | `Cmd+Option+M`   | `Ctrl+Alt+M`      | `Ctrl+Alt+M`      |
| View > Relationships                           | `Cmd+Option+R`   | `Ctrl+Alt+R`      | `Ctrl+Alt+R`      |
| Debug > Show DevTools                          | `Shift+Option+T` | `Shift+Alt+T`     | `Shift+Alt+T`     |
| Debug > Reload                                 | `Cmd+R`          | `Ctrl+R`          | `Ctrl+R`          |


# TouchBar (MacBook)

The TouchBar of Apple's MacBook is useful and convenient editing diagram. In TouchBar, there are some buttons frequently used as shown in the below capture.

![TouchBar (main)](/files/-MJa6kHCTiiaa17Lf5po)

When you select Line Style button in the TouchBar, a new TouchBar for changing line style is popup as below. By pressing Close button, you can go back to the main TouchBar.

![TouchBar (Line Style)](/files/-MJa6mvL1eEk62vbEkOS)

When you select Format button in the TouchBar, a new TouchBar for formatting is popup as below. All buttons are the toggle buttons and you can go back the the main TouchBar when you pressing Close button.

![TouchBar (Format)](/files/-MJa6qN4IpTuUPSuRvSy)


# Customization

## Custom Keymaps

If you want to make custom keymaps, you can create `keymap.json` at the user configuration path:

* `/Users/<user>/Library/Application Support/StarUML` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML` for Windows.
* `~/.config/StarUML` for Linux.

You can get how to edit the custom keymap file (`keymap.json`) at [Keymaps](/v6/developing-extensions/keymaps).

Here is an example:

```javascript
{
  "cmdctrl-alt-1": null,
  "cmdctrl-alt-g": "view:show-grid"
}
```

The first entry is to release the `Ctrl+Alt+1` (`Cmd+Option+1` in MacOS) key binding and the second entry is to change key binding of **View > Show Grid** (Command ID is `view:show-grid`) to `Ctrl+Alt+G` (`Cmd+Option+G` in MacOS).

If you want to know all command IDs, enter the following expression at **Console** (Debug > Show DevTools > Console tab).

```javascript
Object.keys(app.commands.commands)
```

## Custom Fonts

If you want to use custom fonts, you can add a font folder in the custom fonts folder:

* `/Users/<user>/Library/Application Support/StarUML/fonts` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML\fonts` for Windows.
* `~/.config/StarUML/fonts` for Linux.

1. Create a font folder (e.g. `my-font`) at the custom fonts folder.
2. Place a font description file (`font.json`) and the TrueType font files `.ttf` in the font folder.

The font description file looks as below:

```javascript
[
  {
    "name"       : "MyFont",
    "regular"    : "MyFont-Regular.ttf",
    "italic"     : "MyFont-Italic.ttf",
    "bold"       : "MyFont-Bold.ttf",
    "boldItalic" : "MyFont-BoldItalic.ttf"
  }
]
```

StarUML should be restarted to recognize the added custom fonts.


# Class Diagram

![Class Diagram](/files/-MICXxhUZPR6Q1UWMdUN)

## Create Class Diagram

To create a Class Diagram:

1. First select an element where a new Class Diagram to be contained as a child.
2. Select **Model | Add Diagram | Class Diagram** in the Menu Bar or select **Add Diagram | Class Diagram** in Context Menu.

> **See also**
>
> [UML Class Diagram](http://www.uml-diagrams.org/class-diagrams-overview.html) - For more information about UML Class Diagram.

## Model Element

Model Element is an abstract element of all UML model elements.

You can use **QuickEdit** for Model Element by double-click or press `Enter` on a selected model element.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.

## Classifier

Classifier is an abstract element of:

* [Class](/v6/working-with-uml-diagrams/class-diagram#class)
* [Interface](/v6/working-with-uml-diagrams/class-diagram#interface)
* [Signal](/v6/working-with-uml-diagrams/class-diagram#signal)
* [DataType](/v6/working-with-uml-diagrams/class-diagram#datatype)
* [PrimitiveType](/v6/working-with-uml-diagrams/class-diagram#primitivetype)
* [Enumeration](/v6/working-with-uml-diagrams/class-diagram#enumeration)
* [Component](/v6/working-with-uml-diagrams/component-diagram#component)
* [Artifact](/v6/working-with-uml-diagrams/component-diagram#artifact)

You can use **QuickEdit** for Classifier by double-click or press `Enter` on a selected classifier.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.

## Class

To create a Class:

1. Select **Class** in **Toolbox**.
2. Drag on the diagram as the size of Class.

To create a Class (model element only) by Menu:

1. Select an Element where a new Class to be contained.
2. Select **Model | Add | Class** in Menu Bar or **Add | Class** in Context Menu.

You can use **QuickEdit** for Class by double-click or press `Enter` on a selected Class.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Template Parameter** : Add a template parameter.
* **Add Reception** : Add a reception.
* **Add Sub-Class** : Add a sub-class.
* **Add Super-Class** : Add a super class.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.
* **Add Associated Class** : Add an associated class.
* **Add Aggregated Class** : Add an aggregated class.
* **Add Composited Class** : Add a composited class.
* **Add Port** : Add a port.
* **Add Part** : Add a part.

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To suppress Receptions, see [Suppress Receptions](/v6/user-guide/formatting-diagram#suppress-receptions).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Attribute

To add an Attribute:

1. Select a Classifier.
2. Select **Model | Add | Attribute** in Menu Bar or **Add | Attribute** in Context Menu.

You can use **QuickEdit** for Attribute by double-click or press `Enter` on a selected Attribute.

* **Attribute Expression** : Edit Attribute expression.

  *Syntax of Attribute Expression*

  ```
  attribute ::= [ '<<' stereotype `>>` ] [ visibility ] name [':' type ] [ '[' multiplicity ']' ] [ '=' defaut-value ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  type ::= (identifier)
  multiplicity ::= multiplicity-bound [ '..' multiplicity-bound ]
  multiplicity-bound ::= (number) | '*'
  default-value ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more attribute in the below.
* **Delete** (`Ctrl+Delete`) : Delete the attribute
* **Move Up** (`Ctrl+Up`) : Move the attribute up.
* **Move Down** (`Ctrl+Down`) : Move the attribute down.

## Operation

To add an Operation:

1. Select a Classifier.
2. Select **Model | Add | Operation** in Menu Bar or **Add | Operation** in Context Menu.

You can use **QuickEdit** for Operation by double-click or press `Enter` on a selected Operation.

* **Operation Expression** : Edit Operation expression.

  *Syntax of Operation Expression*

  ```
  operation ::= [ '<<' stereotype `>>` ] [ visibility ] name [ '(' parameter-list ')' ] [ ':' return-type ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  parameter-list ::= parameter [ ',' parameter ]*
  parameter ::= (identifier)
  return-type ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more operation in the below.
* **Delete** (`Ctrl+Delete`) : Delete the operation
* **Move Up** (`Ctrl+Up`) : Move the operation up.
* **Move Down** (`Ctrl+Down`) : Move the operation down.

To add a Parameter, see [Parameter](/v6/working-with-uml-diagrams/class-diagram#parameter).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Parameter

To add a Parameter:

1. Select an Operation.
2. Select **Model | Add | Parameter** in Menu Bar or **Add | Parameter** in Context Menu.

## Template Parameter

To add a Template Parameter:

1. Select an Element.
2. Select **Model | Add | Template Parameter** in Menu Bar or **Add | Template Parameter** in Context Menu.

You can use **QuickEdit** for Template Parameter by double-click or press `Enter` on a selected Template Parameter.

* **Template Parameter Expression** : Edit Template Parameter expression.

  *Syntax of Template Parameter Expression*

  ```
  template-parameter ::= [ '<<' stereotype `>>` ] [ visibility ] name [':' type ] [ '=' defaut-value ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  type ::= (identifier)
  default-value ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more template parameter in the below.
* **Delete** (`Ctrl+Delete`) : Delete the template parameter.
* **Move Up** (`Ctrl+Up`) : Move the template parameter up.
* **Move Down** (`Ctrl+Down`) : Move the template parameter down.

## Template Parameter Substitution

To add a Template Parameter Substituion:

1. Select a Template Binding element.
2. Select **Model | Add | Template Parameter Substitution** in Menu Bar or **Add | Template Parameter Substitution** in Context Menu.

Each **Template Parameter Substitution** should have `formal` property assigned to a **Template Parameter** of the template element and `actual` property assigned to the actual value for the template parameter.

## Interface

To create an Interface:

1. Select **Interface** in **Toolbox**.
2. Drag on the diagram as the size of Interface.

To create an Interface (model element only) by Menu:

1. Select an Element where a new Interface to be contained.
2. Select **Model | Add | Interface** in Menu Bar or **Add | Interface** in Context Menu.

You can use **QuickEdit** for Interface by double-click or press `Enter` on a selected Interface.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.
* **Add Sub-Interface** : Add a sub-interface.
* **Add Super-Interface** : Add a super interface.
* **Add Realizing Class** : Add an realizing class.

To show an Interface as Lollipop notation, Interface should be realized (See [Interface Realization](/v6/working-with-uml-diagrams/class-diagram#interface-realization)) and then change Stereotype Display to Icon or Icon with Label (See [Stereotype Display](/v6/user-guide/formatting-diagram#stereotype-display)).

To show an Interface as Socket notation, Interface should have dependants (See [Dependency](/v6/working-with-uml-diagrams/class-diagram#dependency)) and then change Stereotype Display to Icon or Icon with Label (See [Stereotype Display](/v6/user-guide/formatting-diagram#stereotype-display)).

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To suppress Receptions, see [Suppress Receptions](/v6/user-guide/formatting-diagram#suppress-receptions).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Signal

To create a Signal:

1. Select **Signal** in **Toolbox**.
2. Drag on the diagram as the size of Signal.

To create a Signal (model element only) by Menu:

1. Select an Element where a new Signal to be contained.
2. Select **Model | Add | Signal** in Menu Bar or **Add | Signal** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/v6/working-with-uml-diagrams/class-diagram#classifier)).

## DataType

To create a DataType:

1. Select **DataType** in **Toolbox**.
2. Drag on the diagram as the size of DataType.

To create a DataType (model element only) by Menu:

1. Select an Element where a new DataType to be contained.
2. Select **Model | Add | DataType** in Menu Bar or **Add | DataType** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/v6/working-with-uml-diagrams/class-diagram#classifier)).

## PrimitiveType

To create a PrimitiveType:

1. Select **PrimitiveType** in **Toolbox**.
2. Drag on the diagram as the size of PrimitiveType.

To create a PrimitiveType (model element only) by Menu:

1. Select an Element where a new PrimitiveType to be contained.
2. Select **Model | Add | PrimitiveType** in Menu Bar or **Add | PrimitiveType** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/v6/working-with-uml-diagrams/class-diagram#classifier)).

## Enumeration

To create an Enumeration:

1. Select **Enumeration** in **Toolbox**.
2. Drag on the diagram as the size of Enumeration.

To create an Enumeration (model element only) by Menu:

1. Select an Element where a new Enumeration to be contained.
2. Select **Model | Add | Enumeration** in Menu Bar or **Add | Enumeration** in Context Menu.

You can use **QuickEdit** for Enumeration by double-click or press `Enter` on a selected Enumeration.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Literal** (`Ctrl+Enter`) : Add an enumeration literal.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.

To suppress Literals, see see [Suppress Literals](/v6/user-guide/formatting-diagram#suppress-literals).

## Enumeration Literal

To add an Enumeration Literal:

1. Select a Classifier.
2. Select **Model | Add | Enumeration Literal** in Menu Bar or **Add | Enumeration Literal** in Context Menu.

You can use **QuickEdit** for Enumeration Literal by double-click or press `Enter` on a selected Enumeration Literal.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more literal in the below.
* **Delete** (`Ctrl+Delete`) : Delete the literal
* **Move Up** (`Ctrl+Up`) : Move the literal up.
* **Move Down** (`Ctrl+Down`) : Move the literal down.

## Relationship

Relationship is an abstract element representing a relationship between UML elements.

Subclasses of Relationship are:

* [Generalization](/v6/working-with-uml-diagrams/class-diagram#generalization)
* [Association](/v6/working-with-uml-diagrams/class-diagram#association)
* [Aggregation](/v6/working-with-uml-diagrams/class-diagram#aggregation)
* [Composition](/v6/working-with-uml-diagrams/class-diagram#composition)
* [Dependency](/v6/working-with-uml-diagrams/class-diagram#dependency)
* [Interface Realization](/v6/working-with-uml-diagrams/class-diagram#interface-realization)
* [Component Realization](/v6/working-with-uml-diagrams/component-diagram#component-realization)
* [Include](/v6/working-with-uml-diagrams/use-case-diagram#include)
* [Exclude](/v6/working-with-uml-diagrams/use-case-diagram#exclude)

![QuickEdits for Relationship](/files/75ZlIUSeTA7XC3AcJ0pr)

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.

## Generalization

To create a Generalization:

1. Select **Generalization** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Association

To create an Association (or Directed Association):

1. Select **Association** (or **Directed Association**) in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for Association End by double-click at the end side of an Association.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Navigability** : Change navigable property.
* **Aggregation Kind** : Change aggregationKind property.
* **Multiplicity** : Change multiplicity property.
* **Add Qualifier** : Add a qualifier (attribute) to the AssociationEnd.

### Order of Ends

You can show an arrow representing order of ends. If you want to show arrow from end1 to end2, then select `forward` in **QuickEdit**. Or, you want to show arrow from end2 to end1, then select `backward`. You can also hide the arrow by selecting `hide`.

![Order of Ends](/files/9AxFUAwp6GmUukdEr4oH)

### Navigability

You can set `navigable` property of AssociationEnd to one of following:

* `unspecified`
* `navigable`
* `notNavigable`

![Navigability of AssociationEnd](/files/DltueB8IFWawwtc0CKdo)

### N-ary Association

{% hint style="warning" %}
The N-ary association here is different from the UML specification and is not a semantically correct modeling method. Please refer to the UML specification for details.
{% endhint %}

If you want to create N-ary association, you need to create N-ary association node first.

To create an N-ary Association:

1. Select **N-ary Association Node** in Toolbox (Class Advanced)
2. Drag on the diagram as the size of **N-ary Association Node** (diamond shape).
3. Create **Associations** between Classifiers and the **N-ary Association** Node.

![N-ary Association](/files/YX0UIIGhwIMJ9X4KFULs)

### Ownership

To show ownership dot on AssociationEnd, assign `ownerAttribute` of AssociationEnd.

![AssociationEnd's ownership notation](/files/BawJEPYN1XL0kVVqVxWy)

## Aggregation

To create an Aggregation:

1. Select **Aggregation** in **Toolbox**.
2. Drag from an element (to be a part) and drop on another element (to be whole).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for AssociationEnd by double-click at the end side of an Association (See [Association](/v6/working-with-uml-diagrams/class-diagram#association)).

> **Note**
>
> Aggregation is an association whose `aggregation` property is `shared`.

## Composition

To create a Composition:

1. Select **Composition** in **Toolbox**.
2. Drag from an element (to be a part) and drop on another element (to be whole).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for AssociationEnd by double-click at the end side of an Association (See [Association](/v6/working-with-uml-diagrams/class-diagram#association)).

> **Note**
>
> Composition is an association whose `aggregation` property is `composite`.

## Dependency

To create an Dependency:

1. Select **Dependency** in **Toolbox**.
2. Drag from an element (client) and drop on another element (supplier).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Interface Realization

To create an Interface Realization:

1. Select **Interface Realization** in **Toolbox**.
2. Drag from an element (realizing) and drop on an interface (to be realized).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Association Class

To create an Association Class by linking two Classifiers:

1. Select **Association Class** in **Toolbox**.
2. Drag from an element and drop on another element.
3. An Association and a Class connected to the association will be created.

To create an Association Class by linking Association and Class:

1. Select **Association Class** in **Toolbox**.
2. Drag from an Association (or Class) and drop on a Class (or Association).
3. The Class will be connected to the Association.

## Template Binding

To create a Template Binding:

1. Select **Template Binding** in **Toolbox**.
2. Drag from a bound element and drop on a template element.
3. If required, create [Template Parameter Substitution](/v6/working-with-uml-diagrams/class-diagram#template-parameter-substitution).

You can use **QuickEdit** for Template Binding by double-click or press `Enter`.

* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Template Parameter** : Add a template parameter substitution.

## Frame

To create a Frame view of a particular model element:

1. Select **Frame** in **Toolbox**.
2. Drag on the diagram as the size of Frame.
3. Select a model element which the Frame represents in **Element Picker Dialog**

You can show model element type in Frame by checking **Format > Show Type** menu item.

You can show model element's namespace in Frame by checking **Format > Show Namespace** menu item.

You can show diagram name in Frame by checking **Format > Show Diagram Name** menu item.

## Tag

To add a Tag of an element:

1. Select an element to add a Tag.
2. Select **Model | Add | Tag** in Menu Bar or **Add | Tag** in Context Menu.

You can select one of tag kinds: **string**, **reference**, **boolean**, **number,** or **enum**. The `value` property corresponds to **string** kind. The `reference` property corresponds to **reference** kind. The `checked` property corresponds to **boolean** kind. The `number` property corresponds to **number** kind. The `value` and `options` property corresponds to **enum** type.

The `options` property should contains items separated by new line character and the `value` property should have one of the item specified in the `options` property.

The Tags can be shown in views by checking **Format** > **Show Property** menu item. If you don't want to be shown, check `hidden` property.

You can manage Tags conveniently in [Tag Editor](/v6/user-guide/user-interface#tag-editor) with relationships of Stereotype's Attributes.

## Constraint

To add a Constraint of an element:

1. Select an element to add a Constraint.
2. Select **Model | Add | Constraint** in Menu Bar or **Add | Constraint** in Context Menu.

You can create a Constraint view on a diagram by drag and drop from Model Explorer.


# Package Diagram

![Package Diagram](/files/-MIC_13ZHBO7BBMUEZs2)

## Create Package Diagram

To create a Package Diagram:

1. Select first an element where a new Package Diagram to be contained as a child.
2. Select **Model | Add Diagram | Package Diagram** in Menu Bar or select **Add Diagram | Package Diagram** in Context Menu.

> **See also**
>
> [UML Package Diagram](http://www.uml-diagrams.org/package-diagrams-overview.html) - For more information about UML Package Diagram.

## Package

To create a Package on a diagram:

1. Select **Package** in **Toolbox**.
2. Drag on the diagram as the size of Package.

To create a Package (model element only) by Menu:

1. Select an Element where a new Package to be contained.
2. Select **Model | Add | Package** in Menu Bar or **Add | Package** in Context Menu.

You can use **QuickEdit** for Package by double-click or press `Enter` on a selected Package.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Sub-Package** : Add a sub-package.
* **Add Dependant Package** : Add a dependant package.
* **Add Depending Package** : Add a depending package.

## Model

To create a Model on a diagram:

1. Select **Model** in **Toolbox**.
2. Drag on the diagram as the size of Model.

To create a Model (model element only) by Menu:

1. Select an Element where a new Model to be contained.
2. Select **Model | Add | Model** in Menu Bar or **Add | Model** in Context Menu.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Subsystem

To create a Subsystem on a diagram:

1. Select **Subsystem** in **Toolbox**.
2. Drag on the diagram as the size of Subsystem.

To create a Subsystem (model element only) by Menu:

1. Select an Element where a new Subsystem to be contained.
2. Select **Model | Add | Subsystem** in Menu Bar or **Add | Subsystem** in Context Menu.

You can use **QuickEdit** for Subsystem by double-click or press `Enter` on a selected Subsystem.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.

## Containment

To make an Containment relation:

1. Select **Containment** in **Toolbox**.
2. Drag from an element (to be contained) and drop on a container element.

> **Note**
>
> There is no Containment model element. The Containment view element only show the containment relationship between two elements. (Contained elements are shown as children in **Model Explorer**)


# Composite Structure Diagram

![Composite Structure Diagram (from uml-diagram.org)](/files/Fc9MC8NJpoNifBqKyMYz)

## Create Composite Structure Diagram

To create a Composite Structure Diagram:

1. Select first an element where a new Composite Structure Diagram to be contained as a child.
2. Select **Model | Add Diagram | Composite Structure Diagram** in Menu Bar or select **Add Diagram | Composite Structure Diagram** in Context Menu.

> **See also**
>
> [UML Composite Structure Diagram](http://www.uml-diagrams.org/composite-structure-diagrams.html) For more information about UML Composite Structure Diagram.

## Collaboration

To create a Collaboration:

1. Select **Collaboration** in **Toolbox**.
2. Drag on the diagram as the size of Collaboration.

To create a Collaboration (model element only) by Menu:

1. Select an Element where a new Collaboration to be contained.
2. Select **Model | Add | Collaboration** in Menu Bar or **Add | Collaboration** in Context Menu.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Port

To create a Port:

1. Select **Port** in **Toolbox**.
2. Click on the element (e.g. Class) where Port to be contained.

To create a Port (model element only) by Menu:

1. Select an Element where a new Port to be contained.
2. Select **Model | Add | Port** in Menu Bar or **Add | Port** in Context Menu.

You can use **QuickEdit** for Port by double-click or press `Enter` on a selected Port.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Type** : Select a Classifier and assign it to type property.
* **Create Type** : Create a Class and assign it to type property.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.
* **Add Connected Part** : Add a connected part.

## Part

To create a Part:

1. Select **Part** in **Toolbox**.
2. Click on the element (e.g. Class) where Part to be contained.

You can use **QuickEdit** for Port (See [Port](/v6/working-with-uml-diagrams/composite-structure-diagram#port)).

> **Note**
>
> Actually, Part is equivalent to Attribute but represented differently on diagrams.

## Connector

To create an Connector:

1. Select **Connector** in **Toolbox**.
2. Drag from an element (e.g. Port) and drop on another element (e.g. Part).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Collaboration Use

To create a Collaboration Use:

1. Select **Collaboration Use** in **Toolbox**.
2. Drag on the diagram as the size of Collaboration Use.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Role Binding

To create an Role Binding:

1. Select **Role Binding** in **Toolbox**.
2. Drag from a Collaboration Use and drop on an element (e.g. Part).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Object Diagram

![Object Diagram (from uml-diagrams.org)](/files/L0zfqGzbYwb13NKl9I9e)

## Create Object Diagram

To create a Object Diagram:

1. Select first an element where a new Object Diagram to be contained as a child.
2. Select **Model | Add Diagram | Object Diagram** in Menu Bar or select **Add Diagram | Object Diagram** in Context Menu.

> **See also**
>
> [UML Object Diagram](http://www.uml-diagrams.org/class-diagrams-overview.html#object-diagram) - For more information about UML Object Diagram.

## Object

To create a Object:

1. Select **Object** in **Toolbox**.
2. Drag on the diagram as the size of Object.

You can use **QuickEdit** for Object by double-click or press `Enter` on a selected Object.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Slot** (`Ctrl+Enter`) : Add a slot.
* **Add Linked Object** : Add a linked object.

## Slot

To add an Slot:

1. Select an Instance.
2. Select **Model | Add | Slot** in Menu Bar or **Add | Slot** in Context Menu.

You can use **QuickEdit** for Slot by double-click or press `Enter` on a selected Slot.

* **Slot Expression** : Edit Slot expression.

  *Syntax of Slot Expression*

  ```
  slot ::= [ '<<' stereotype `>>` ] [ visibility ] name [':' type ] [ '=' value ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  type ::= (identifier)
  value ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more slot in the below.
* **Delete** (`Ctrl+Delete`) : Delete the slot
* **Move Up** (`Ctrl+Up`) : Move the slot up.
* **Move Down** (`Ctrl+Down`) : Move the slot down.

## Artifact Instance

To create a Artifact Instance:

1. Select **Artifact Instance** in **Toolbox**.
2. Drag on the diagram as the size of Artifact Instance.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Component Instance

To create a Component Instance:

1. Select **Component Instance** in **Toolbox**.
2. Drag on the diagram as the size of Component Instance.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Node Instance

To create a Node Instance:

1. Select **Node Instance** in **Toolbox**.
2. Drag on the diagram as the size of Node Instance.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Link

To create an Link (or Directed Link):

1. Select **Link** (or **Directed Link**) in **Toolbox**.
2. Drag from an instance and drop on another instance.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

You can also use **QuickEdit** for LinkEnd by double-click at the end side of an Link.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Navigability** : Change navigability property.
* **Aggregation Kind** : Change aggregationKind property.
* **Multiplicity** : Change multiplicity property.

## Link Object

To create a Link Object (instance of Association Class) by linking two Instances:

1. Select **Link Object** in **Toolbox**.
2. Drag from an element and drop on another element.
3. A Link Object is created between the instances.

To create a Link Object by linking Link and Object:

1. Select **Link Object** in **Toolbox**.
2. Drag from a Link (or Object) and drop on an Object (or Link).
3. The Object will be connected to the Link.


# Component Diagram

![Component Diagram (from uml-diagrams.org)](/files/-MICi2nwCTedxQZXrWJ4)

## Create Component Diagram

To create a Component Diagram:

1. Select first an element where a new Component Diagram to be contained as a child.
2. Select **Model | Add Diagram | Component Diagram** in Menu Bar or select **Add Diagram | Component Diagram** in Context Menu.

> **See also**
>
> [UML Component Diagram](http://www.uml-diagrams.org/component-diagrams.html) - For more information about UML Component Diagram.

## Component

To create a Component:

1. Select **Component** in **Toolbox**.
2. Drag on the diagram as the size of Component.

To create a Component (model element only) by Menu:

1. Select an Element where a new Component to be contained.
2. Select **Model | Add | Component** in Menu Bar or **Add | Component** in Context Menu.

You can use **QuickEdit** for Component by double-click or press `Enter` on a selected Component.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.
* **Add Port** : Add a port.
* **Add Part** : Add a part.

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Artifact

To create a Artifact:

1. Select **Artifact** in **Toolbox**.
2. Drag on the diagram as the size of Artifact.

To create a Artifact (model element only) by Menu:

1. Select an Element where a new Artifact to be contained.
2. Select **Model | Add | Artifact** in Menu Bar or **Add | Artifact** in Context Menu.

You can use **QuickEdit** for Classifier (See [Classifier](/v6/working-with-uml-diagrams/class-diagram#classifier)).

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Component Realization

To create an Component Realization:

1. Select **Component Realization** in **Toolbox**.
2. Drag from an element (realizing) and drop on a Component (to be realized).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Deployment Diagram

![Deployment Diagram (from uml-diagrams.org)](/files/-MICkWhlRoCujD6QGjK6)

## Create Deployment Diagram

To create a Deployment Diagram:

1. Select first an element where a new Deployment Diagram to be contained as a child.
2. Select **Model | Add Diagram | Deployment Diagram** in Menu Bar or select **Add Diagram | Deployment Diagram** in Context Menu.

> **See also**
>
> [UML Deployment Diagram](http://www.uml-diagrams.org/deployment-diagrams-overview.html) - For more information about UML Deployment Diagram.

## Node

To create a Node:

1. Select **Node** in **Toolbox**.
2. Drag on the diagram as the size of Node.

To create a Node (model element only) by Menu:

1. Select an Element where a new Node to be contained.
2. Select **Model | Add | Node** in Menu Bar or **Add | Node** in Context Menu.

You can use **QuickEdit** for Node by double-click or press `Enter` on a selected Node.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.
* **Add Communicating Node** : Add a communicating node.
* **Add Deployed Component** : Add a deployed component.
* **Add Deployed Artifact** : Add a deployed artifact.

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Deployment

To create an Deployment:

1. Select **Deployment** in **Toolbox**.
2. Drag from an element (to be deployed) and drop on a Node.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Communication Path

To create an Communication Path:

1. Select **Communication Path** in **Toolbox**.
2. Drag from a Node and drop on another Node.

You can use **QuickEdit** for Association (See [Association](/v6/working-with-uml-diagrams/class-diagram#association)).


# Use Case Diagram

![Use Case Diagram (from uml-diagrams.org)](/files/-MICliFgJLTApzyyCz-B)

## Create Use Case Diagram

To create a Use Case Diagram:

1. Select first an element where a new Use Case Diagram to be contained as a child.
2. Select **Model | Add Diagram | Use Case Diagram** in Menu Bar or select **Add Diagram | Use Case Diagram** in Context Menu.

> **See also**
>
> [UML Use Case Diagram](http://www.uml-diagrams.org/use-case-diagrams.html) - For more information about UML Use Case Diagram.

## Use Case Subject

To create an Use Case Subject:

1. Select **Use Case Subject** in **Toolbox**.
2. Drag on the diagram as the size of Use Case Subject.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Actor

To create an Actor:

1. Select **Actor** in **Toolbox**.
2. Drag on the diagram as the size of Actor.

To create an Actor (model element only) by Menu:

1. Select an Element where a new Actor to be contained.
2. Select **Model | Add | Actor** in Menu Bar or **Add | Actor** in Context Menu.

You can use **QuickEdit** for Actor by double-click or press `Enter` on a selected Actor.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Sub-Actor** : Add a sub-actor.
* **Add Super-Actor** : Add a super actor.
* **Add Associated Use Case** : Add an associated use case.

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Use Case

To create an Use Case:

1. Select **Use Case** in **Toolbox**.
2. Drag on the diagram as the size of Use Case.

To create an Use Case (model element only) by Menu:

1. Select an Element where a new Use Case to be contained.
2. Select **Model | Add | Use Case** in Menu Bar or **Add | Use Case** in Context Menu.

You can use **QuickEdit** for Use Case by double-click or press `Enter` on a selected Use Case.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Extension Point** (`Ctrl+Enter`) : Add an extension point.
* **Add Associated Actor** : Add an associated actor.
* **Add Included Use Case** : Add an included use case.
* **Add Extended Use Case** : Add an extended use case.

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Extension Point

To add an Extension Point:

1. Select an Use Case.
2. Select **Model | Add | Extension Point** in Menu Bar or **Add | Extension Point** in Context Menu.

You can use **QuickEdit** for Extension Point by double-click or press `Enter` on a selected Extension Point.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add** (`Ctrl+Enter`) : Add one more extension point in the below.
* **Delete** (`Ctrl+Delete`) : Delete the extension point
* **Move Up** (`Ctrl+Up`) : Move the extension point up.
* **Move Down** (`Ctrl+Down`) : Move the extension point down.

## Include

To create an Include:

1. Select **Include** in **Toolbox**.
2. Drag from a Use Case and drop on another Use Case (to be included).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Extend

To create an Extend:

1. Select **Extend** in **Toolbox**.
2. Drag from a Use Case (to be extended) and drop on another Use Case.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Sequence Diagram

![Sequence Diagram (from uml-diagrams.org)](/files/-MICnb8M-BVR_7g9dtr9)

## Create Sequence Diagram

To create a Sequence Diagram:

1. Select first an element where a new Sequence Diagram to be contained as a child.
2. Select **Model | Add Diagram | Sequence Diagram** in Menu Bar or select **Add Diagram | Sequence Diagram** in Context Menu.

> **See also**
>
> [UML Sequence Diagram](http://www.uml-diagrams.org/sequence-diagrams.html) - For more information about UML Sequence Diagram.

You can show or hide sequence numbers of messages. To show or hide sequence numbers of message:

1. Check or Uncheck `showSequenceNumber` property of **Sequence Diagram** or **Communication Diagram**.

## Lifeline

To create a Lifeline:

1. Select **Lifeline** in **Toolbox**.
2. Drag on the diagram as the size of Lifeline.

To create a Lifeline from a Classifier (Class, Interface, etc.) by Drag-and-Drop:

1. Drag a Classifier from **Explorer**.
2. Drop on the diagram.

You can use **QuickEdit** for Lifeline by double-click or press `Enter` on a selected Lifeline.

* **Lifeline Expression** : Edit lifeline expression.

  *Syntax of Lifeline Expression*

  ```
  lifeline ::= [ '<<' stereotype `>>` ] [ visibility ] name [ '[' selector ']' ] [ ':' type ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  selector ::= (string)
  type ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Type** : Select a type of the lifeline.
* **Create Type** : Create a Class as a type of the lifeline.
* **Add Message with Lifeline** : Add a message with a lifeline.
* **Add Create Message with Lifeline** : Add a create message with a lifeline.
* **Add Self Message** : Add a self message.
* **Add Found Message** : Add a found message.
* **Add Lost Message** : Add a lost message.
* **Add Message from Gate** : Add a message from a gate.
* **Add Message to Gate** : Add a message to a gate.

## Message

To create a Message (or Self Message):

1. Select **Message** (or **Self Message**) in **Toolbox**.
2. Drag from a Lifeline and drop on another Lifeline. (Just click on a Lifeline if you want to create a self message.)

You can change the kind of message by setting `messageSort` property in **Property Editor**:

* `synchCall` : Synchronous Call
* `asynchCall` : Asynchronous Call
* `asynchSignal` : Asynchronous Signal
* `createMessage` : Create Message
* `deleteMessage` : Delete Message
* `reply` : Reply Message

You can use custom sequence numbers instead of auto-generated integer sequence numbers.

1. Enter sequence number for each Message's `sequenceNumber` property.
2. Change `sequenceNumbering` property of **Sequence Diagram** or **Communication Diagram** to `custom`.

You can use **QuickEdit** for Message by double-click or press `Enter` on a selected Message.

* **Message Expression** : Edit message expression.

  *Syntax of Message Expression*

  ```
  message ::= [ '<<' stereotype `>>` ] [ visibility ] [ target '=' ] name [ '(' arguments ')' ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  target ::= (identifier)
  name ::= (identifier)
  arguments ::= (string)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Operation** : Select an operation as a signature of the message.
* **Create Operation** : Create an operation as a signature of the message.
* **Select Signal** : Select a signal as a signature of the message.
* **Create Signal** : Create a signal as a signature of the message.
* **Add Reply Message** : Add a reply message.

## Endpoint

To create an Endpoint:

1. Select **Endpoint** in **Toolbox**.
2. Click at the position on the diagram.

## Gate

To create a Gate:

1. Select **Gate** in **Toolbox**.
2. Click at the position on the diagram.

## State Invariant

To create a State Invariant:

1. Select **State Invariant** in **Toolbox**.
2. Click on a Lifeline where the State Invariant to be attached.

You can use **QuickEdit** for State Invariant by double-click or press `Enter` on a selected State Invariant.

* **Invariant** : Edit invariant property.

## Continuation

To create a Continuation:

1. Select **Continuation** in **Toolbox**.
2. Drag on the diagram as the size of Continuation.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Combined Fragment

To create a Combined Fragment:

1. Select **Combined Fragment** in **Toolbox**.
2. Drag on the diagram as the size of Combined Fragment.

You can change the operator by setting `interactionOperator` property in **Property Editor**:

* `alt` : alternatives
* `opt` : option
* `par` : parallel
* `loop` : iteration
* `critical` : critical region
* `neg` : negative
* `assert` : assertion
* `strict` : strict sequencing
* `seq` : weak sequencing
* `ignore` : ignore
* `consider` : consider
* `break` : break

You can use **QuickEdit** for Combined Fragment by double-click or press `Enter` on a selected Combined Fragment.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add Operand** : Add an interaction operand.

## Interaction Operand

You can use **QuickEdit** for Interaction Operand by double-click or press `Enter` on a selected Interaction Operand.

* **Guard** : Edit guard property.

## Interaction Use

To create a Interaction Use:

1. Select **Interaction Use** in **Toolbox**.
2. Drag on the diagram as the size of Interaction Use.


# Communication Diagram

![Communication Diagram (from uml-diagrams.org)](/files/-MICpoS_qw4t5S27mUPU)

## Create Communication Diagram

To create a Communication Diagram:

1. Select first an element where a new Communication Diagram to be contained as a child.
2. Select **Model | Add Diagram | Communication Diagram** in Menu Bar or select **Add Diagram | Communication Diagram** in Context Menu.

> **See also**
>
> [UML Communication Diagram](http://www.uml-diagrams.org/communication-diagrams.html) - For more information about UML Communication Diagram.

You can show or hide sequence numbers of messages. To show or hide sequence numbers of message:

1. Check or Uncheck `showSequenceNumber` property of **Sequence Diagram** or **Communication Diagram**.

## Lifeline

To create a Lifeline:

1. Select **Lifeline** in **Toolbox**.
2. Drag on the diagram as the size of Lifeline.

To create a Lifeline from a Classifier (Class, Interface, etc.) by Drag-and-Drop:

1. Drag a Classifier from **Explorer**.
2. Drop on the diagram.

You can use **QuickEdit** for Lifeline by double-click or press `Enter` on a selected Lifeline.

* **Lifeline Expression** : Edit lifeline expression.

  *Syntax of Lifeline Expression*

  ```
  lifeline ::= [ '<<' stereotype `>>` ] [ visibility ] name [ '[' selector ']' ] [ ':' type ]
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  selector ::= (string)
  type ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Type** : Select a type of the lifeline.
* **Create Type** : Create a Class as a type of the lifeline.
* **Add Connected Lifeline** : Add a lifeline with a connector.
* **Add Create Message with Lifeline** : Add a create message with a lifeline.
* **Add Self Connector** : Add a self connector.
* **Add Forward Message** : Add a forward message with a connected lifeline.
* **Add Reverse Message** : Add a reverse message with a connected lifeline.

## Connector

To create an Connector (or Self Connector):

1. Select **Connector** (or **Self Connector**) in **Toolbox**.
2. Drag from a Lifeline and drop on another Lifeline. (Just click on a Lifeline if you want to create a Self Connector.)

You can use **QuickEdit** for Connector by double-click or press `Enter` on a selected Connector.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Navigability** : Change navigability property.
* **Add Forward Message** : Add a forward message on the connector.
* **Add Reverse Message** : Add a reverse message on the connector.

## Message

To create a Forward Message:

1. Select **Forward Message** in **Toolbox**.
2. Click on a Connector.

To create a Reverse Message:

1. Select **Reverse Message** in **Toolbox**.
2. Click on a Connector.

You can use custom sequence numbers instead of auto-generated integer sequence numbers.

1. Enter sequence number for each Message's `sequenceNumber` property.
2. Change `sequenceNumbering` property of **Sequence Diagram** or **Communication Diagram** to `custom`.

You can use **QuickEdit** for Message (See [Message](/v6/working-with-uml-diagrams/sequence-diagram#message)).


# Timing Diagram

![Timing Diagram (from uml-diagram.org)](/files/-MI2z3dRhLl5jp1VghUI)

## Create Timing Diagram

To create a Timing Diagram:

1. Select first an element where a new Timing Diagram to be contained as a child.
2. Select **Model | Add Diagram | Timing Diagram** in Menu Bar or select **Add Diagram | Timing Diagram** in Context Menu.

> **See also**
>
> [UML Timing Diagram](https://www.uml-diagrams.org/timing-diagrams.html) - For more information about UML Timing Diagram.

## Lifeline

To create a Lifeline:

1. Select **Lifeline** in **Toolbox**.
2. Drag on the diagram as the size of Lifeline.

To create a Lifeline from a Classifier (Class, Interface, etc.) by Drag-and-Drop:

1. Drag a Classifier from **Explorer**.
2. Drop on the diagram.

You can use **QuickEdit** for Lifeline by double-click or press `Enter` on a selected Lifeline.

* **Lifeline Expression** : Edit lifeline expression.
* **Visibility** : Change visibility property.
* **Select Type** : Select a type of the lifeline.
* **Create Type** : Create a Class as a type of the lifeline.
* **Create State/Condition** : Create a State/Condition on the lifeline.

## State/Condition

To create a State/Condition:

1. Select **State/Condition** in **Toolbox**.
2. Click on a Lifeline on the diagram.

You can use **QuickEdit** for State/Condition by double-click or press `Enter` on a selected State/Condition.

* **Name Expression** : Edit state/condition name.
* **Visibility** : Change visibility property.
* **Create Time Segment** : Create a Time Segment on the State/Condition.

## Time Segment

To create a Time Segment

1. Select **Time Segment** in **Toolbox**.
2. Click on a State/Condition area on the diagram.

## Time Tick

To create a Time Tick

1. Select **Time Tick** in **Toolbox**.
2. Click on the Timing Diagram Frame area on the diagram.

## Time Constraint

To create a Time Constraint

1. Select **Time Constraint** in **Toolbox**.
2. Click on an element (e.g. Message or Time Segment) to attach a time constraint on the diagram.

## Duration Constraint

To create a Duration Constraint

1. Select **Duration Constraint** in **Toolbox**.
2. Drag on the diagram as the size of Duration Constraint.

## Message

To create a Message:

1. Select **Message** in **Toolbox**.
2. Drag from a Time Segment and drop on another Time Segment.

For more about Message, visit the [Message](/v6/working-with-uml-diagrams/sequence-diagram#message) section in Sequence Diagram.


# Interaction Overview Diagram

![Interaction Overview Diagram (from uml-diagram.org)](/files/-MI30dE-4ySmP11nb3tJ)

## Create Interaction Overview Diagram

To create an Interaction Overview Diagram:

1. Select first an element where a new Interaction Overview Diagram to be contained as a child.
2. Select **Model | Add Diagram | Interaction Overview Diagram** in Menu Bar or select **Add Diagram | Interaction Overview Diagram** in Context Menu.

> **See also**
>
> [UML Interaction Overview Diagram](https://www.uml-diagrams.org/interaction-overview-diagrams.html) - For more information about UML Interaction Overview Diagram

> Note that Interaction Overview Diagram is a kind of Activity Diagram, so all nodes are activity nodes and all edges are activity edges.

## Interaction Use

To create a Interaction Use node:

1. Select **Interaction Use** in **Toolbox**.
2. Drag on the diagram as the size of Interaction Use.

You can also create an Interaction Use node by drag and drop an existing Interaction Use from Model Explorer.

Double-clicking the node will select the corresponding Interaction Use element in Model Explorer.

## Interaction (inline)

To create a Interaction (inline) node:

1. Select **Interaction (inline)** in **Toolbox**.
2. Drag on the diagram as the size of Interaction.

Creating an Interaction (inline) node will also create a new Sequence Diagram. The sequence diagram is shown inside the Interaction Frame.

To edit the sequence diagram inside, double-click the Interaction Frame.

You can also create Interaction (inline) node by drag and drop an existing Sequence Diagram from Model Explorer.

## Initial

To create an Initial node:

1. Select **Initial** in **Toolbox**.
2. Click at the position on the diagram.

## Final

To create a Final node:

1. Select **Final** in **Toolbox**.
2. Click at the position on the diagram.

## Fork

To create a Fork node:

1. Select **Fork** in **Toolbox**.
2. Drag on the diagram as the size of Fork.

## Join

To create a Join node:

1. Select **Join** in **Toolbox**.
2. Drag on the diagram as the size of Join.

## Merge

To create a Merge node:

1. Select **Merge** in **Toolbox**.
2. Click at the position on the diagram.

## Decision

To create a Decision node:

1. Select **Decision** in **Toolbox**.
2. Click at the position on the diagram.

## Control Flow

To create a Control Flow:

1. Select **Control Flow** in **Toolbox**.
2. Drag from a node and drop on another node.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Statechart Diagram

![Statechart Diagram (from uml-diagrams.org)](/files/-MICxAvMSYxvy5EHLMAo)

## Create Statechart Diagram

To create a Statechart Diagram:

1. Select first an element where a new Statechart Diagram to be contained as a child.
2. Select **Model | Add Diagram | Statechart Diagram** in Menu Bar or select **Add Diagram | Statechart Diagram** in Context Menu.

> **See also**
>
> [UML Statechart Diagram](http://www.uml-diagrams.org/state-machine-diagrams.html) - For more information about UML Statechart Diagram.

## State

To create a Simple State:

1. Select **Simple State** in **Toolbox**.
2. Drag on the diagram as the size of Simple State.

To create a Composite State:

1. Select **Composite State** in **Toolbox**.
2. Drag on the diagram as the size of Composite State.

To create a Submachine State:

1. Select **Submachine State** in **Toolbox**.
2. Drag on the diagram as the size of Submachine State.
3. Select a StateMachine in **Element Picker Dialog**.

To create an Orthogonal State:

1. Select **Orthogonal State** in **Toolbox**.
2. Drag on the diagram as the size of Orthogonal State.

You can use **QuickEdit** for State by double-click or press `Enter` on a selected State.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add ConnectionPointReference** : Add a connection point reference.
* **Add Region** : Add a region.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Entry Activity** : Add an entry activity.
* **Add Do Activity** : Add an do activity.
* **Add Exit Activity** : Add an exit activity.
* **Add Internal Transition** : Add an internal transition.

## Internal Activity

To add an Entry Activity:

1. Select a State.
2. Select **Model | Add | Entry Activity** in Menu Bar or **Add | Entry Activity** in Context Menu.
3. Select a kind of Activity to create (one of OpaqueBehavior, Activity, StateMachine, or Interaction).

To add a Do Activity:

1. Select a State.
2. Select **Model | Add | Do Activity** in Menu Bar or **Add | Do Activity** in Context Menu.
3. Select a kind of Activity to create (one of OpaqueBehavior, Activity, StateMachine, or Interaction).

To add an Exit Activity:

1. Select a State.
2. Select **Model | Add | Exit Activity** in Menu Bar or **Add | Exit Activity** in Context Menu.
3. Select a kind of Activity to create (one of OpaqueBehavior, Activity, StateMachine, or Interaction).

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Internal Transition

To add an Internal Transition:

1. Select a State.
2. Popup Quic Edit for State by double click or press `Enter` on a selected State.
3. Select **Add Internal Transition** button in Quick Edit.

You can use **QuickEdit** for Internal Transition by double-click or press `Enter` on a selected Internal Transition.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add Trigger Event** : Add a trigger event.
* **Add Effect Behavior** : Add an effect behavior.

## Region

To add a Region:

1. Select a State.
2. Select **Model | Add | Region** in Menu Bar or **Add | Region** in Context Menu.

## Initial State

To create a Initial State:

1. Select **Initial State** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Choice

To create a Choice:

1. Select **Choice** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Join

To create a Join:

1. Select **Join** in **Toolbox**.
2. Drag on the diagram as the size of Join.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Fork

To create a Fork:

1. Select **Fork** in **Toolbox**.
2. Drag on the diagram as the size of Fork.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Junction

To create a Junction:

1. Select **Junction** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Shallow History

To create a Shallow History:

1. Select **Shallow History** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Deep History

To create a Deep History:

1. Select **Deep History** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Entry Point

To create a Entry Point:

1. Select **Entry Point** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Exit Point

To create a Exit Point:

1. Select **Exit Point** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Terminate

To create a Terminate:

1. Select **Terminate** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Final State

To create a Final State:

1. Select **Final State** in **Toolbox**.
2. Click at the position on the diagram.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Connection Point Reference

To create a Connection Point Reference:

1. Select **Connection Point Reference** in **Toolbox**.
2. Click on a State where Connection Point Reference to be contained.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Transition

To create a Transition (or Self Transition):

1. Select **Transition** (or **Self Transition**) in **Toolbox**.
2. Drag from a State and drop on another State. (Just click on a State if you want to create a Self Transition.)

You can use **QuickEdit** for Transition by double-click or press `Enter` on a selected Transition.

* **Transition Expression** : Edit transition expression.

  *Syntax of Transition Expression*

  ```
  transition ::= [ trigger-list ] [ '[' guard ']' ] [ '/' effect ]
  trigger-list ::= trigger [ ',' trigger ]
  trigger ::= (identifier)
  guard ::= (string)
  effect ::= (identifier)
  ```
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Trigger Event** : Add a trigger event.
* **Add Effect Behavior** : Add an effect behavior.


# Activity Diagram

<img src="/files/Qvj0o7R9ZNPGICWLioaO" alt="Activity Diagram (from uml-diagrams.org)" width="563">

## Create Activity Diagram

To create an Activity Diagram:

1. Select first an element where a new Activity Diagram to be contained as a child.
2. Select **Model | Add Diagram | Activity Diagram** in Menu Bar or select **Add Diagram | Activity Diagram** in Context Menu.

> **See also**
>
> [UML Activity Diagram](http://www.uml-diagrams.org/activity-diagrams.html) - For more information about UML Activity Diagram.

## Action

To create an Action:

1. Select **Action** in **Toolbox**.
2. Drag on the diagram as the size of Action.

You can use **QuickEdit** for Action by double-click or press `Enter` on a selected Action.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Add Input Pin** : Add an input pin.
* **Add Output Pin** : Add an output pin.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Trigger Event** : Add a trigger event.
* **Add Outgoing Control Flow** : Add an outgoing control flow with an action.
* **Add Incoming Control Flow** : Add an incoming control flow with an action.
* **Add Outgoing Object Flow** : Add an outgoing object flow with an object node.
* **Add Incoming Object Flow** : Add an incoming object flow with an object node.
* **Add Decision** : Add a decision with two additional actions.
* **Add Merge** : Add a merge with two additional actions.
* **Add Fork** : Add a fork with two additional actions.
* **Add Join** : Add a join with two additional actions.
* **Add Initial Node** : Add an initial node with a connected control flow.
* **Add Final Node** : Add an final node with a connected control flow.

## Trigger

To add a Trigger:

1. Select an Action.
2. Select **Model | Add | Trigger** in Menu Bar or **Add | Trigger** in Context Menu.

## Initial Node

To create an Initial Node:

1. Select **Initial** in **Toolbox**.
2. Click at the position on the diagram.

## Activity Final Node

To create an Activity Final Node:

1. Select **Activity Final** in **Toolbox**.
2. Click at the position on the diagram.

## Fork Node

To create a Fork Node:

1. Select **Fork** in **Toolbox**.
2. Drag on the diagram as the size of Fork.

## Join Node

To create a Join Node:

1. Select **Join** in **Toolbox**.
2. Drag on the diagram as the size of Join.

## Merge Node

To create a Merge Node:

1. Select **Merge** in **Toolbox**.
2. Click at the position on the diagram.

## Decision Node

To create a Decision Node:

1. Select **Decision** in **Toolbox**.
2. Click at the position on the diagram.

## Swimlane (Partition)

To create a Swimlane (Vertical or Horizontal):

1. Select **Swimlane (Vertical)** or **Swimlane (Horizontal)** in **Toolbox**.
2. Drag on the diagram as the size of Swimlane.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Interruptible Activity Region

To create an Interruptible Activity Region:

1. Select **Interruptible Activity Region** in **Toolbox**.
2. Drag on the diagram as the size of Interruptible Activity Region.

## Structured Activity Node

To create a Structured Activity Node:

1. Select **Structured Activity** in **Toolbox**.
2. Drag on the diagram as the size of Structured Activity Node.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Input Pin

To create an Input Pin:

1. Select **Input Pin** in **Toolbox**.
2. Click on an Action where Input Pin to be attached.

## Output Pin

To create an Output Pin:

1. Select **Output Pin** in **Toolbox**.
2. Click on an Action where Output Pin to be attached.

## Send Signal

To create a Send Signal:

1. Select **Send Signal** in **Toolbox**.
2. Drag on the diagram as the size of Send Signal.

Send Signal is actually an Action whose kind is `sendSignal`.

## Accept Signal

To create an Accept Signal:

1. Select **Accept Signal** in **Toolbox**.
2. Drag on the diagram as the size of Accept Signal.

Accept Signal is actually an Action whose kind is `acceptSignal`.

## Accept Time Event

To create an Accept Time Event:

1. Select **Accept Time Event** in **Toolbox**.
2. Drag on the diagram as the size of Accept Time Event.

Accept Time Event is actually an Action whose kind is `timeEvent`.

## Flow Final Node

To create a Flow Final Node:

1. Select **Flow Final** in **Toolbox**.
2. Click at the position on the diagram.

## Object Node

To create a Object Node:

1. Select **Object Node** in **Toolbox**.
2. Drag on the diagram as the size of Object Node.

You can use **QuickEdit** for Object Node by double-click or press `Enter` on a selected Object Node.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Outgoing Object Flow** : Add an outgoing object flow with an object node.
* **Add Incoming Object Flow** : Add an incoming object flow with an object node.
* **Add Outgoing Control Flow** : Add an outgoing control flow with an action.
* **Add Incoming Control Flow** : Add an incoming control flow with an action.

## Central Buffer

To create a Central Buffer:

1. Select **Central Buffer** in **Toolbox**.
2. Drag on the diagram as the size of Central Buffer.

You can use **QuickEdit** for Object Node (See [Object Node](/v6/working-with-uml-diagrams/activity-diagram#object-node)).

## Datastore

To create a Datastore:

1. Select **Datastore** in **Toolbox**.
2. Drag on the diagram as the size of Datastore.

You can use **QuickEdit** for Object Node (See [Object Node](/v6/working-with-uml-diagrams/activity-diagram#object-node)).

## Activity Parameter Node

To create an Activity Parameter Node:

1. Select **Activity Parameter Node** in **Toolbox**.
2. Drag on the diagram as the size of Activity Parameter Node.

If you set the name as blank, the associated parameter's textual notation will be shown as the name.

You can use **QuickEdit** for Object Node (See [Object Node](/v6/working-with-uml-diagrams/activity-diagram#object-node)).

## Expansion Region

To create a Expansion Region:

1. Select **Expansion Region** in **Toolbox**.
2. Drag on the diagram as the size of Expansion Region.

You can use **QuickEdit** for Model Element (See [Model Element](/v6/working-with-uml-diagrams/class-diagram#model-element)).

## Input Expansion Node

To create an Input Expansion Node:

1. Select **Input Expansion Node** in **Toolbox**.
2. Click on an Expansion Node where Input Expansion Node to be attached.

## Output Expansion Node

To create an Output Expansion Node:

1. Select **Output Expansion Node** in **Toolbox**.
2. Click on an Expansion Node where Output Expansion Node to be attached.

## Control Flow

To create a Control Flow:

1. Select **Control Flow** in **Toolbox**.
2. Drag from a node and drop on another node.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Object Flow

To create an Object Flow:

1. Select **Object Flow** in **Toolbox**.
2. Drag from a node and drop on another node.

## Exception Handler

To create an Extension Handler:

1. Select **Extension Handler** in **Toolbox**.
2. Drag from a node and drop on another node.

## Activity Interrupt

To create an Activity Interrupt:

1. Select **Activity Interrupt** in **Toolbox**.
2. Drag from a node and drop on another node.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Information Flow Diagram

![Information Flow Diagram (from uml-diagram.org)](/files/-MI346nQZK2z5ZuQOq1F)

## Create Information Flow Diagram

To create a Information Flow Diagram:

1. Select first an element where a new Information Flow Diagram to be contained as a child.
2. Select **Model | Add Diagram | Information Flow Diagram** in Menu Bar or select **Add Diagram | Information Flow Diagram** in Context Menu.

> **See also**
>
> [UML Information Flow Diagram](https://www.uml-diagrams.org/information-flow-diagrams.html) - For more information about UML Information Flow Diagram

## Information Item

To create an Information Item:

1. Select **Information Item** in **Toolbox**.
2. Drag on the diagram as the size of Information Item.

You can use **QuickEdit** for Information Item by double-click or press `Enter` on a selected Information Item.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint**: Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Reception** : Add a reception.

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To suppress Receptions, see [Suppress Receptions](/v6/user-guide/formatting-diagram#suppress-receptions).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

## Information Flow

To create an Information Flow:

1. Select **Information Flow** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Profile Diagram

![Profile Diagram](/files/-MID-KwUOUrIns2komj9)

## Create Profile Diagram

To create a Profile Diagram:

1. Select first an element where a new Profile Diagram to be contained as a child.
2. Select **Model | Add Diagram | Profile Diagram** in Menu Bar or select **Add Diagram | Profile Diagram** in Context Menu.

> **See also**
>
> [UML Profile Diagram](http://www.uml-diagrams.org/profile-diagrams.html) - For more information about UML Profile Diagram.

## Profile

To create a Profile (model element only) by Menu:

1. Select an Element where a new Profile to be contained.
2. Select **Model | Add | Profile** in Menu Bar or **Add | Profile** in Context Menu.

## MetaClass

To create a MetaClass:

1. Select **MetaClass** in **Toolbox**.
2. Drag on the diagram as the size of MetaClass.

To create a MetaClass (model element only) by Menu:

1. Select an Element where a new MetaClass to be contained.
2. Select **Model | Add | MetaClass** in Menu Bar or **Add | MetaClass** in Context Menu.

You can use **QuickEdit** for MetaClass by double-click or press `Enter` on a selected MetaClass.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Stereotype** : Add a stereotype with a connected extension.

## Stereotype

To create a Stereotype:

1. Select **Stereotype** in **Toolbox**.
2. Drag on the diagram as the size of Stereotype.

To create a Stereotype (model element only) by Menu:

1. Select an Element where a new Stereotype to be contained.
2. Select **Model | Add | Stereotype** in Menu Bar or **Add | Stereotype** in Context Menu.

You can use **QuickEdit** for Stereotype by double-click or press `Enter` on a selected Stereotype.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** (`Ctrl+Enter`) : Add an attribute.
* **Add Operation** (`Ctrl+Shift+Enter`) : Add an operation.
* **Add Sub-Stereotype** : Add a sub-stereotype.
* **Add Super-Stereotype** : Add a super stereotype.

To suppress Attributes, see [Suppress Attributes](/v6/user-guide/formatting-diagram#suppress-attributes).

To suppress Operations, see [Suppress Operations](/v6/user-guide/formatting-diagram#suppress-operations).

To show or hide Operation Signatures, see [Show Operation Signature](/v6/user-guide/formatting-diagram#show-operation-signature).

### Stereotype Icon

You can assign an icon for stereotype in two ways:

1. Image : Select an image file (PNG, JPEG) to the `image` property in **Property Editor**.
2. Icon Script : Write an icon script in `content` property in **Property Editor**.

Stereotype's `width` property and `height` property represents minimal width and minimal height of the icon respectively.

The assigned icon is shown when you set **Format > Stereotype Display** to **Decoration**, **Decoration with Label**, **Icon**, **Icon with Label** of the view elements.

### Icon Script

You can use very tiny icon script language to represent a stereotype icon as below:

```
!icon 40 40              # header (mandatory) : width height
l 0 0 40 40              # line : x1 y1 x2 y2
r 0 0 40 40              # rectangle : x1 y1 x2 y2
rr 0 0 40 40 5           # round rect : x1 y1 x2 y2 radius
e 0 0 40 40              # ellipse : x1 y1 x2 y2
pl 0 0 10 10 20 20 ...   # polyline : x1 y1 x2 y2 x3 y2 ...
pg 0 0 10 10 20 20 ...   # polygon : x1 y1 x2 y2 x3 y2 ...
a 20 20 15 90 180        # arc : x y radius startAngle endAngle
fr 0 0 40 40             # fill rect : x1 y1 x2 y2
frr 0 0 40 40 5          # fill round rect : x1 y1 x2 y2 radius
fe 0 0 40 40             # fill ellipse : x1 y1 x2 y2
fp 0 0 10 10 20 20 ...   # fill polygon : x1 y1 x2 y2 x3 y2 ...
fa 20 20 15 90 180       # fill arc : x y radius startAngle endAngle
%l #ffff00               # line color : color
%f #ffffff               # fill color : color
%a 0.4                   # alpha : alpha
%w 2                     # line width : width
%p 4 4                   # line pattern : line1 gap1 line2 gap2 ... 
```

The icon script must starts with `!icon` header. The width and height in  `!icon` header doesn't mean the actual icon size but means XY coordinates for the drawing commands. For example, if `!icon 40 40` is given, you can draw shapes in `(0, 0)` \~ `(40, 40)` coordinates.

Please note that the default line color and fill color are the view element's line color and fill color. If you use the command `%l` or `%f` without argument, the line color or the fill color is set to the view element's line color or fill color.

Here is an example of icon script for the entity, boundary, control standard stereotypes in UMLStandardProfile.

![Icons for entity, boundary, control stereotypes](/files/GxWfcKdlKZTB8HOvKYTu)

{% code title="<<entity>>" %}

```
!icon 40 40
e 3 3 37 37
l 3 37 37 37
```

{% endcode %}

{% code title="<<boundary>>" %}

```
!icon 50 40
e 10 0 50 40
l 0 0 0 40
l 0 20 10 20
```

{% endcode %}

{% code title="<<control>>" %}

```
!icon 40 40
e 5 5 35 35
l 20 5 25 0
l 20 5 25 10
```

{% endcode %}

## Extension

To create a Extension:

1. Select **Extension** in **Toolbox**.
2. Drag from a Stereotype and drop on a MetaClass.

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Requirement Diagram

![Requirement Diagram](/files/-MIHeNgCUaIyV4zgcToN)

## Create Requirement Diagram

To create a Requirement Diagram:

1. Select first an element where a new Requirement Diagram to be contained as a child.
2. Select **Model | Add Diagram | Requirement Diagram** in Menu Bar or select **Add Diagram | Requirement Diagram** in Context Menu.

## Requirement

To create a Requirement:

1. Select **Requirement** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use **QuickEdit** for Requirement by double-click or press `Enter` on a selected Requirement.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint**: Add a constraint.
* **Add Sub-Requirement** : Add a Requirement with a contained relationship.

To suppress Property Values, check (or uncheck) **Format | Suppress Property Values** in Menu Bar or Context Menu

## Copy

To create a Copy:

1. Select **Copy** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## DeriveReqt

To create a DeriveReqt:

1. Select **DeriveReqt** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Verify

To create a Verify:

1. Select **Verify** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Satisfy

To create a Satisfy:

1. Select **Satisfy** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).

## Refine

To create a Refine:

1. Select **Refine** in **Toolbox**.
2. Drag from an element (to be special) and drop on another element (to be general).

You can use **QuickEdit** for Relationship (See [Relationship](/v6/working-with-uml-diagrams/class-diagram#relationship)).


# Block Definition Diagram

![Block Definition Diagram](/files/-MIHox224YM47HP-TB-y)

## Create Block Definition Diagram

To create a Block Definition Diagram:

1. Select first an element where a new Block Definition Diagram to be contained as a child.
2. Select **Model | Add Diagram | Block Definition Diagram** in Menu Bar or select **Add Diagram | Block Definition Diagram** in Context Menu.

## Block

To create a Block:

1. Select **Block** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Block (model element only) by Menu:

1. Select an Element where a new Block to be contained.
2. Select **Model | Add | Block** in Menu Bar or **Add | Block** in Context Menu.

You can use **QuickEdit** for Block by double-click or press `Enter` on a selected Block.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Part** : Add a part property.
* **Add Reference** : Add a reference property.
* **Add Value** : Add a value property (typed by ValueType).
* **Add Flow Property** : Add a flow property.
* **Add Constraint Property** : Add a constraint property.
* **Add Property** : Add a property.
* **Add Operation** : Add an operation.
* **Add Reception** : Add a reception.
* **Add Port** : Add a port.
* **Add Composited Block** : Add a composited block.

To suppress Constraint Properties, check (or uncheck) **Format | Suppress Constraints** in Menu Bar or Context Menu.

To suppress Part Properties, check (or uncheck) **Format | Suppress Parts** in Menu Bar or Context Menu.

To suppress Port Properties, check (or uncheck) **Format | Suppress Ports** in Menu Bar or Context Menu.

To suppress Reference Properties, check (or uncheck) **Format | Suppress References** in Menu Bar or Context Menu.

To suppress Values Properties, check (or uncheck) **Format | Suppress Values** in Menu Bar or Context Menu.

To suppress Properties, check (or uncheck) **Format | Suppress Properties** in Menu Bar or Context Menu.

To suppress Flow Properties, check (or uncheck) **Format | Suppress Flow Properties** in Menu Bar or Context Menu.

## Value Type

To create a Value Type:

1. Select **Value Type** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Value Type (model element only) by Menu:

1. Select an Element where a new Value Type to be contained.
2. Select **Model | Add | Value Type** in Menu Bar or **Add | Value Type** in Context Menu.

You can use **QuickEdit** for Value Type by double-click or press `Enter` on a selected Value Type.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Attribute** : Add an attribute.
* **Add Operation** : Add an operation.
* **Add Reception** : Add a reception.

To suppress Property Values, check (or uncheck) **Format | Suppress Property Values** in Menu Bar or Context Menu.

To suppress Attributes, check (or uncheck) **Format | Suppress Attributes** in Menu Bar or Context Menu.

To suppress Operations, check (or uncheck) **Format | Suppress Operations** in Menu Bar or Context Menu.

To suppress Receptions, check (or uncheck) **Format | Suppress Receptions** in Menu Bar or Context Menu.

## Interface Block

To create a Interface Block:

1. Select **Interface Block** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Interface Block (model element only) by Menu:

1. Select an Element where a new Interface Block to be contained.
2. Select **Model | Add | Interface Block** in Menu Bar or **Add | Interface Block** in Context Menu.

You can use the same **QuickEdit** for [Block](/v6/working-with-sysml-diagrams/block-definition-diagram#block) by double-click or press `Enter` on the selected Interface Block.

## Constraint Block

To create a Constraint Block:

1. Select **Constraint Block** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Constraint Block (model element only) by Menu:

1. Select an Element where a new Constraint Block to be contained.
2. Select **Model | Add | Constraint Block** in Menu Bar or **Add | Constraint Block** in Context Menu.

You can use **QuickEdit** for Constraint Block by double-click or press `Enter` on a selected Constraint Block.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Add Parameter** : Add a constraint parameter.

To suppress Constraint Properties, check (or uncheck) **Format | Suppress Constraints** in Menu Bar or Context Menu.

To suppress Constraint Parameters, check (or uncheck) **Format | Suppress Properties** in Menu Bar or Context Menu.

## Port

To create a Port:

1. Select **Port** in **Toolbox**.
2. Click on the element (e.g. Class) where Port to be contained.

To create a Port (model element only) by Menu:

1. Select an Element where a new Port to be contained.
2. Select **Model | Add | Port** in Menu Bar or **Add | Port** in Context Menu.

You can use **QuickEdit** for Port by double-click or press `Enter` on a selected Port.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Block** : Select a Block and assign it to type property.
* **Create Block** : Create a Block and assign it to type property.
* **Add Provided Interface** : Add a provided interface.
* **Add Required Interface** : Add a required interface.

## Object

See [Object](/v6/working-with-uml-diagrams/object-diagram#object) in Object Diagram.

## Connector

To create an Connector:

1. Select **Connector** in **Toolbox**.
2. Drag from an element (e.g. Port) and drop on another element (e.g. Part).

You can use **QuickEdit** for Connector by double-click or press `Enter` on a selected Connector.

* **Name Expression** : Edit name expression.
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Create Item Flow** : Create an Item Flow. The both Ports (or Parts) should be typed to create an Item Flow.


# Internal Block Diagram

![Internal Block Diagram](/files/-MK3OYtUzbe8rFgiNWaL)

## Create Block Definition Diagram

To create a Internal Block Diagram:

1. Select first a Block where a new Internal Block Diagram to be contained as a child.
2. Select **Model | Add Diagram | Internal Block Diagram** in Menu Bar or select **Add Diagram | Internal Block Diagram** in Context Menu.

## Part

To create a Part:

1. Select **Part** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use **QuickEdit** for Part by double-click or press `Enter` on a selected Part.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Block** : Select a Block and assign it to type property.
* **Create Block** : Create a Block and assign it to type property.
* **Select Value Type** : Select a Value Type and assign it to type property.
* **Create Value Type** : Create a Value Type and assign it to type property.
* **Add Port** : Add a port.

## Reference

To create a Reference:

1. Select **Reference** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use the same **QuickEdit** for [Part](/v6/working-with-sysml-diagrams/internal-block-diagram#part) by double-click or press `Enter` on the selected Reference.

## Value

To create a Value:

1. Select **Value** in **Toolbox**.
2. Drag on the diagram as the size you want.

You can use the same **QuickEdit** for [Part](/v6/working-with-sysml-diagrams/internal-block-diagram#part) by double-click or press `Enter` on the selected Value.

## Port

See [Port](/v6/working-with-sysml-diagrams/block-definition-diagram#port) in Block Definition Diagram.

## Connector

See [Connector](/v6/working-with-sysml-diagrams/block-definition-diagram#connector) in Block Definition Diagram.


# Parametric Diagram

![Parametric Diagram](/files/-MIIe4ZIRpi8UmFVk992)

## Create Block Definition Diagram

To create a Parametric Diagram:

1. Select first a Constraint Block where a new Parametric Diagram to be contained as a child.
2. Select **Model | Add Diagram | Parametric Diagram** in Menu Bar or select **Add Diagram | Parametric Diagram** in Context Menu.

## Constraint Property

To create a Constraint Property:

1. Select **Constraint Property** in **Toolbox**.
2. Drag on the diagram as the size you want.

To create a Constraint Property (model element only) by Menu:

1. Select a Constraint Block where a new Constraint Property to be contained.
2. Select **Model | Add | Constraint Property** in Menu Bar or **Add | Constraint Property** in Context Menu.

You can use **QuickEdit** for Constraint Property by double-click or press `Enter` on a selected Constraint Property.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Constraint Block** : Select a Constraint Block and assign it to type property.
* **Create Constraint Block** : Create a Constraint Block and assign it to type property.
* **Add Constraint Parameter** : Add a constraint parameter.

## Constraint Parameter

To create a Constraint Parameter:

1. Select **Constraint Parameter** in **Toolbox**.
2. Click on the element (e.g. Constraint Property or Parametric Diagram Frame) where Constraint Parameter to be contained.

You can use **QuickEdit** for Constraint Parameter by double-click or press `Enter` on a selected Constraint Parameter.

* **Name Expression** : Edit name expression.

  *Syntax of Name Expression*

  ```
  expression ::= [ '<<' stereotype `>>` ] [ visibility ] name
  stereotype ::= (identifier)
  visibility ::= '+' | '#' | '-' | '~'
  name ::= (identifier)
  ```
* **Visibility** : Change visibility property.
* **Add Note** : Add a linked note.
* **Add Constraint** : Add a constraint.
* **Select Block** : Select a Block and assign it to type property.
* **Create Block** : Create a Block and assign it to type property.


# Entity-Relationship Diagram

![Entity-Relationship Diagram](/files/uRWXcc0u7SziwprUc96A)

## Create Entity-Relationship Diagram

To create a Entity-Relationship Diagram:

1. Select first an element where a new Entity-Relationship Diagram to be contained as a child.
2. Select **Model | Add Diagram | ER Diagram** in Menu Bar or select **Add Diagram | ER Diagram** in Context Menu.

## Data Model

To create a Data Model (model element only) by Menu:

1. Select an Element where a new Data Model to be contained.
2. Select **Model | Add | Data Model** in Menu Bar or **Add | Data Model** in Context Menu.

## Entity

To create an Entity:

1. Select **Entity** in **Toolbox**.
2. Drag on the diagram as the size of Entity.

To create a Entity (model element only) by Menu:

1. Select a Data Model where a new Entity to be contained.
2. Select **Model | Add | Entity** in Menu Bar or **Add | Entity** in Context Menu.

You can use **QuickEdit** for Entity by double-click or press `Enter` on a selected Entity.

* **Name** : Enter name.
* **Add Note** : Add a linked note.
* **Add Column** (`Ctrl+Enter`) : Add a column.
* **Add One to One** : Add an one-to-one relationship with an entity.
* **Add One to Many** : Add an one-to-many relationship with an entity.
* **Add Many to Many** : Add an many-to-many relationship with an entity.

To suppress Columns, see [Suppress Columns](/v6/user-guide/formatting-diagram#suppress-columns).

## Column

To add a Column:

1. Select an Entity.
2. Select **Model | Add | Column** in Menu Bar or **Add | Column** in Context Menu.

You can use **QuickEdit** for Column by double-click or press `Enter` on a selected Column.

* **Column Expression** : Edit column expression.

  *Syntax of Column Expression*

  ```
  column ::= name [ ':' type ] [ '(' length ')' ]
  name ::= (identifier)
  type ::= (identifier)
  length ::= (string)
  ```
* **Primary Key** : Check whether the column is primary key or not.
* **Add** (`Ctrl+Enter`) : Add one more column in the below.
* **Delete** (`Ctrl+Delete`) : Delete the column
* **Move Up** (`Ctrl+Up`) : Move the column up.
* **Move Down** (`Ctrl+Down`) : Move the column down.

## Relationship

To create a Relationship:

1. Select **One-to-One Relationship**, **One-to-Many Relationship** or **Many-to-Many Relationship** in **Toolbox**.
2. Drag from an entity and drop on another entity.

You can use **QuickEdit** for Relationship by double-click or press `Enter` on a selected Relationship.

* **Name** : Enter name.
* **Identifying** : Check whether the relationship is identifying or not.
* **Add Note** : Add a linked note.

You can also use **QuickEdit** for Relationship End by double-click at the end side of a Relationship.

* **Name** : Enter name.
* **Cardinality** : Select cardinality of the selected relationship end.


# Flowchart Diagram

<img src="/files/-MID2H83Cglp5L0-lz_2" alt="Flowchart Diagram" width="563">

## Create Flowchart Diagram

To create a Flowchart Diagram:

1. Select first an element where a new Flowchart Diagram to be contained as a child.
2. Select **Model | Add Diagram | Flowchart Diagram** in Menu Bar or select **Add Diagram | Flowchart Diagram** in Context Menu.

## Flowchart Element

Flowchart Element is an abstract element of all flowchart elements.

You can use **QuickEdit** for Flowchart Element by double-click or press `Enter` on a selected Flowchart Element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Outgoing Process** : Add an outgoing flow with a process.
* **Add Incoming Process** : Add an incoming flow with a process.
* **Add Outgoing Decision** : Add an outgoing flow with a decision.
* **Add Incoming Decision** : Add an incoming flow with a decision.

## Flow

To create a Flow:

1. Select **Flow** in **Toolbox**.
2. Drag from an flowchart element and drop on another flowchart element.

You can use **QuickEdit** by double-click or press `Enter` on a selected flow.

* **Name** : Edit name.
* **Add Note** : Add a linked note.

## Process

To create a Process:

1. Select **Process** in **Toolbox**.
2. Drag on the diagram as the size of Process.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Terminator

To create a Terminator:

1. Select **Terminator** in **Toolbox**.
2. Drag on the diagram as the size of Terminator.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Decision

To create a Decision:

1. Select **Decision** in **Toolbox**.
2. Drag on the diagram as the size of Decision.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Delay

To create a Delay:

1. Select **Delay** in **Toolbox**.
2. Drag on the diagram as the size of Delay.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Predefined Process

To create a Predefined Process:

1. Select **Predefined Process** in **Toolbox**.
2. Drag on the diagram as the size of Predefined Process.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Alternate Process

To create a Alternate Process:

1. Select **Alternate Process** in **Toolbox**.
2. Drag on the diagram as the size of Alternate Process.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Data

To create a Data:

1. Select **Data** in **Toolbox**.
2. Drag on the diagram as the size of Data.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Document

To create a Document:

1. Select **Document** in **Toolbox**.
2. Drag on the diagram as the size of Document.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Multi-Document

To create a Multi-Document:

1. Select **Multi-Document** in **Toolbox**.
2. Drag on the diagram as the size of Multi-Document.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Preparation

To create a Preparation:

1. Select **Preparation** in **Toolbox**.
2. Drag on the diagram as the size of Preparation.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Display

To create a Display:

1. Select **Display** in **Toolbox**.
2. Drag on the diagram as the size of Display.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Manual Input

To create a Manual Input:

1. Select **Manual Input** in **Toolbox**.
2. Drag on the diagram as the size of Manual Input.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Manual Operation

To create a Manual Operation:

1. Select **Manual Operation** in **Toolbox**.
2. Drag on the diagram as the size of Manual Operation.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Card

To create a Card:

1. Select **Card** in **Toolbox**.
2. Drag on the diagram as the size of Card.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Punched Tape

To create a Punched Tape:

1. Select **Punched Tape** in **Toolbox**.
2. Drag on the diagram as the size of Punched Tape.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Connector

To create a Connector:

1. Select **Connector** in **Toolbox**.
2. Drag on the diagram as the size of Connector.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Off-Page Connector

To create a Off-Page Connector:

1. Select **Off-Page Connector** in **Toolbox**.
2. Drag on the diagram as the size of Off-Page Connector.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Or

To create a Or:

1. Select **Or** in **Toolbox**.
2. Drag on the diagram as the size of Or.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Summing Junction

To create a Summing Junction:

1. Select **Summing Junction** in **Toolbox**.
2. Drag on the diagram as the size of Summing Junction.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Collate

To create a Collate:

1. Select **Collate** in **Toolbox**.
2. Drag on the diagram as the size of Collate.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Sort

To create a Sort:

1. Select **Sort** in **Toolbox**.
2. Drag on the diagram as the size of Sort.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Merge

To create a Merge:

1. Select **Merge** in **Toolbox**.
2. Drag on the diagram as the size of Merge.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Extract

To create a Extract:

1. Select **Extract** in **Toolbox**.
2. Drag on the diagram as the size of Extract.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Stored Data

To create a Stored Data:

1. Select **Stored Data** in **Toolbox**.
2. Drag on the diagram as the size of Stored Data.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Database

To create a Database:

1. Select **Database** in **Toolbox**.
2. Drag on the diagram as the size of Database.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Direct Access Storage

To create a Direct Access Storage:

1. Select **Direct Access Storage** in **Toolbox**.
2. Drag on the diagram as the size of Direct Access Storage.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).

## Internal Storage

To create a Internal Storage:

1. Select **Internal Storage** in **Toolbox**.
2. Drag on the diagram as the size of Internal Storage.

You can use **QuickEdit** for Flowchart Element (See [Flowchart Element](/v6/working-with-additional-diagrams/flowchart-diagram#flowchart-element)).


# Data Flow Diagram

![Data Flow Diagram](/files/-MID39mWxC-nvaAVfHHH)

## Create Data Flow Diagram

To create a Data Flow Diagram:

1. Select first an element where a new Data Flow Diagram to be contained as a child.
2. Select **Model | Add Diagram | Data Flow Diagram** in Menu Bar or select **Add Diagram | Data Flow Diagram** in Context Menu.

## Data Flow Model

To create a Data Flow Model (model element only) by Menu:

1. Select an Element where a new Data Flow Model to be contained.
2. Select **Model | Add | Data Flow Model** in Menu Bar or **Add | Data Flow Model** in Context Menu.

## External Entity

To create an External Entity:

1. Select **External Entity** in **Toolbox**.
2. Drag on the diagram as the size of External Entity.

You can use **QuickEdit** for External Entity by double-click or press `Enter` on a selected External Entity.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Outgoing Process** : Add an outgoing data flow with a process.

## Process

To create a Process:

1. Select **Process** in **Toolbox**.
2. Drag on the diagram as the size of Process.

You can use **QuickEdit** for Process by double-click or press `Enter` on a selected Process.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Incoming External Entity** : Add an incoming data flow with an external entity.
* **Add Outgoing Process** : Add an outgoing data flow with a process.
* **Add Outgoing Datastore** : Add an outgoing data flow with a datastore.

## Datastore

To create a Datastore:

1. Select **Datastore** in **Toolbox**.
2. Drag on the diagram as the size of Datastore.

You can use **QuickEdit** for Datastore by double-click or press `Enter` on a selected Datastore.

* **Name** : Edit name.
* **Add Note** : Add a linked note.
* **Add Incoming Process** : Add an incoming data flow with a process.

## Data Flow

To create a Data Flow:

1. Select **Data Flow** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected data flow.

* **Name** : Edit name.
* **Add Note** : Add a linked note.


# C4 Diagram

<figure><img src="/files/9u3WYNZ21gQDsIUyHato" alt=""><figcaption><p>C4 Diagram</p></figcaption></figure>

## Create C4 Diagram

To create a C4 Diagram:

1. Select first an element where a new C4 Diagram to be contained as a child.
2. Select **Model | Add Diagram | C4 Diagram** in Menu Bar or select **Add Diagram | C4 Diagram** in Context Menu.

## C4 Model

To create a C4 Model (model element only) by Menu:

1. Select an Element where a new C4 Model to be contained.
2. Select **Model | Add | C4 Model** in Menu Bar or **Add | C4 Model** in Context Menu.

## Element (Person, Software System, Container, Component)

To create a C4 element:

1. Select **Person, Software System, Container, Component or Element** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a linked note.

You can edit `description` or `technology` properties in **Property Editor**.

> An element is shown as a dashed boundary if it is shown in a diagram which is one of children of the element.

> If you need elements other than Person, Software System, Container or Component, you can use (general) **Element** in Toolbox for Deployment Node, Infrastructure Node, etc.

## Relationship

To create a relationship:

1. Select **Relationship** in **Toolbox**.
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit description.
* **Add Note** : Add a linked note.

You can edit `description` or `technology` properties in **Property Editor**.


# BPMN Diagram

BPMN (Business Process Modeling Notation) provides various types of diagram including Process Diagram, Collaboration Diagram, Choreography Diagram and Conversation Diagram. In StarUML, you can draw all types of diagram in a BPMN Diagram.

<figure><img src="/files/9esnWy8Al71jDDg5NHhc" alt=""><figcaption><p>BPMN Process Diagram</p></figcaption></figure>

<figure><img src="/files/hOQLuPPK2F7RlEvlyCyk" alt=""><figcaption><p>BPMN Collaboration Diagram</p></figcaption></figure>

<figure><img src="/files/6cGnDWzOMEurF8wEzkrc" alt=""><figcaption><p>BPMN Choreography Diagram</p></figcaption></figure>

<figure><img src="/files/YPgugyLxZ117H9yuuXkn" alt=""><figcaption><p>BPMN Conversation Diagram</p></figcaption></figure>

## Create BPMN Diagram

To create a BPMN Diagram:

1. Select first an element where a new BPMN Diagram to be contained as a child.
2. Select **Model | Add Diagram | BPMN Diagram** in Menu Bar or select **Add Diagram | BPMN Diagram** in Context Menu.

## Business Process

To create a Business Process (model element only) by Menu:

1. Select an Element where a new Business Process to be contained.
2. Select **Model | Add | Business Process** in Menu Bar or **Add | Business Process** in Context Menu.

## Pool (Participant)

To create a Pool (Participant) element:

1. Select the Pool (default is horizontal) or Pool (Vertical) element in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Add Lane** : Add a lane inside the Pool.

## Lane

To create a Lane element:

1. Select the Lane (default is horizontal) or Lane (Vertical) element in **Toolbox**.
2. Drag on the diagram as the size (inside a Pool element).

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Activities (Task, Sub Process, etc.)

To create a Activity element:

1. Select an Activity in **Toolbox**. **Task** element in BPMN Basic tool group and BPMN Activities tool group. You can also select various types of Tasks including **Send Task, Receive Task, Service Task, User Task, Manual Task, Business Rule Task, Script Task, Call Activity, Sub Process, Adhoc Sub Process, and Transaction**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Add Boundary Event** : Add a boundary event attached to the activity.

<figure><img src="/files/dzPOlexa9mh7jnTtU3jy" alt=""><figcaption><p>Types of Task</p></figcaption></figure>

## Sequence Flow

To create a sequence flow:

1. Select **Sequence Flow** in **Toolbox** (BPMN Basic group).
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit description.
* **Add Text Annotation** : Add a text annotation with association.

## Events (Start, Intermediate, Boundary, End)

To create an Event element:

1. Select an Event in **Toolbox** (BPMN Events group). You can create one of event types including **Start Event, Intermediate Catch Event, Intermediate Throw Event, Boundary Event** and **End Event**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Event Definitions**: Create one of the Event Definition elements: **Message**, **Timer**, **Error**, **Escalation**, **Cancel**, **Compensate**, **Conditional**, **Link**, **Signal**, **Terminate**, **Multiple**, **ParallelMultiple.**&#x20;

> You can create multiple Event Definitions for an Event

<figure><img src="/files/dqrq8aZO1pB3IsZaOqdg" alt=""><figcaption><p>Events with Event Definitions</p></figcaption></figure>

## Gateways

To create a Gateway element:

1. Select a Gateway in **Toolbox** (BPMN Gateways group). You can create one of gateway types including **Exclusive**, **Inclusive**, **Complex**, **Parallel**, and **Event-Based.**
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

<figure><img src="/files/8hz4svv5CEVljqAj3Lt3" alt=""><figcaption><p>Types of Gateway</p></figcaption></figure>

## Data Objects

To create a Data Object element:

1. Select a Data Object in **Toolbox** (BPMN Data group). You can create one of data object types including **Data Object**, **Data Store**, **Data Input**, and **Data Output.**
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Data Association

To create a data association:

1. Select **Data Association** in **Toolbox** (BPMN Data group).
2. Drag from an element and drop on another element.

## Message

To create a Message element:

1. Select the Message in **Toolbox** (BPMN Message group).
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Message Flow

To create a message flow:

1. Select **Message Flow** in **Toolbox** (BPMN Message group).
2. Drag from an element and drop on another element.

You can use **QuickEdit** by double-click or press `Enter` on a selected relationship.

* **Name** : Edit description.
* **Add Text Annotation** : Add a text annotation with association.

## Choreography Task

To create a Choreography Task element:

1. Select a Choreography Task in **Toolbox** (BPMN Choreography group). You can also create **Sub Choreography.**
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.
* **Assign Participant (Upper)** : Assign an existing participant into upper side.
* **Assign Participant (Lower)** : Assign an existing participant into lower side.
* **Create Participant (Upper)** : Create a participant and assign it to into upper side.
* **Create Participant (Lower)** : Create a participant and assign it to into lower side.
* **Initiating Participant** : Assign an initiating participant (shown with gray background color).
* **Create Initiating Message** : Create an initiating Message and link it with Message Link.
* **Create Return Message** : Create a return Message and link it with Message Link (shown with gray color).

## Conversation

To create a conversation element:

1. Select the Conversation in **Toolbox** (BPMN Conversation group). You can create also **Sub Conversation** or **Call Conversation**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Text Annotation** : Add a text annotation with association.

## Conversation Link

To create a conversation link:

1. Select **Conversation Link** in **Toolbox** (BPMN Conversation group).
2. Drag from an element and drop on another element.

## Text Annotation

To create a text annotation element:

1. Select the Text Annotation in **Toolbox** (BPMN Artifact group).
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Text** : Edit text.

## Association

To create an association:

1. Select **Association** in **Toolbox** (BPMN Artifact group).
2. Drag from an element and drop on another element.

## Group

To create a group element:

1. Select the Group in **Toolbox** (BPMN Artifact group).
2. Drag on the diagram as the size.


# Mindmap Diagram

<figure><img src="/files/ybndBq8bNykpeTQjupr1" alt=""><figcaption><p>Mindmap Diagram</p></figcaption></figure>

## Create Mindmap Diagram

To create a Mindmap Diagram:

1. Select first an element where a new Mindmap Diagram to be contained as a child.
2. Select **Model | Add Diagram | Mindmap Diagram** in Menu Bar or select **Add Diagram | Mindmap Diagram** in Context Menu.

## Mindmap Model

To create a Mindmap Model (model element only) by Menu:

1. Select an Element where a new Mindmap Model to be contained.
2. Select **Model | Add | Mindmap** in Menu Bar or **Add | Mindmap** in Context Menu.

## Node

To create a node element:

1. Select  **Node** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Node Left** : Add a linked node to the left.
* **Add Node Right** : Add a linked node to the right.

## Edge

To create an edge:

1. Select **Edge** in **Toolbox**.
2. Drag from a node and drop on another node.


# Wireframe Diagram

<figure><img src="/files/8PxUHjHWNWBcLE3YAxYp" alt=""><figcaption><p>Wireframe Diagram (Mobile)</p></figcaption></figure>

<figure><img src="/files/3A9YsdzxDg0SCs9O22P7" alt=""><figcaption><p>Wireframe Diagram (Web)</p></figcaption></figure>

## Create Wireframe Diagram

To create a Wireframe Diagram:

1. Select first an element where a new Wireframe Diagram to be contained as a child.
2. Select **Model | Add Diagram | Wireframe Diagram** in Menu Bar or select **Add Diagram | Wireframe Diagram** in Context Menu.

## Wireframe Model

To create a Wireframe Model (model element only) by Menu:

1. Select an Element where a new Wireframe Model to be contained.
2. Select **Model | Add | Wireframe** in Menu Bar or **Add | Wireframe** in Context Menu.

## Frame

To create a frame element:

1. Select **Frame** in **Toolbox**. You can select one of the frames including **Frame** (General), **Frame (Mobile)**, **Frame (Web)**, **Frame (Desktop)**.
2. Drag on the diagram as the size.

## Button

To create a button element:

1. Select  **Button** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Text

To create a text element:

1. Select  **Text** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

> You can also use **Text** or **TextBox** in **Annotations Toolbox**

## Radio

To create a ratio element:

1. Select  **Ratio** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

> You can show checked state by checking `checked` property in **Property Editor**

## Checkbox

To create a checkbox element:

1. Select  **Checkbox** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

> You can show checked state by checking `checked` property in **Property Editor**

## Switch

To create a switch element:

1. Select  **Switch** in **Toolbox**.
2. Drag on the diagram as the size.

> You can show checked state by checking `checked` property in **Property Editor**

## Link

To create a link element:

1. Select  **Link** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Tab

To create a tab element:

1. Select  **Tab** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Tab List

To create a tab list element:

1. Select  **Tab List** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Add Tab** : Add a tab.
* **Add Note** : Add a note.

## Input

To create an input element:

1. Select  **Input** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Dropdown

To create a dropdown element:

1. Select **Dropdown** in **Toolbox**.
2. Drag on the diagram as the size.

You can use **QuickEdit** for element by double-click or press `Enter` on a selected element.

* **Name** : Edit name.
* **Add Note** : Add a note.

## Panel

To create a panel element:

1. Select **Panel** in **Toolbox**.
2. Drag on the diagram as the size.

## Image

To create an image element:

1. Select **Image** in **Toolbox**.
2. Drag on the diagram as the size.

## Separator

To create a separator element:

1. Select **Separator** in **Toolbox**.
2. Drag on the diagram as the size.

> You can show the separator vertically by checking `isVertical` property in **Property Editor**

## Avatar

To create an avatar element:

1. Select **Avatar** in **Toolbox**.
2. Drag on the diagram as the size.

## Slider

To create a slider element:

1. Select **Slider** in **Toolbox**.
2. Drag on the diagram as the size.

> You can adjust the slider handle by setting the `value` property (0\~ 100) in **Property Editor**.




---

[Next Page](/llms-full.txt/1)

