Sparx EA offers numerous ways to create new diagrams, and then add elements and connectors to your diagrams, this blog entry summarizes these different options.
Creating a new Diagram in Sparx EA
- by first selecting a Package or Element in the Project Browser and either:
- using the Ctrl+Insert Shortcut Key,
- selecting the New Diagram Icon in the Project Browser, or
- selecting the Diagram Menu -> New,
- by first selecting an Element in an existing Diagram, and on it’s context menu (right click) selecting:
- Sparx EA 12.1: New Child Diagram.
Adding Elements and Connectors to the Diagram
- by first selecting the Element in the toolbox, then clicking on the Diagram where you want the Element created,
- by first selecting the Connector in the toolbox, then clicking on the first Element (source) on the Diagram and dragging to the second Element (target) you want to connect,
- by first selecting an existing Element on the Diagram and using the Quick Linker,
- by using the Diagram’s context menu (right click) and selecting New Element or Connector
- by selecting an existing Element in the Project Browser and Dragging it on to the Diagram.
- by selecting one or more existing Elements in another Diagram then dragging them on to the Current Diagram (I typically use this with floating diagrams)
- by selecting one or more existing Elements in another Diagram then copying them and pasting them on to the Current Diagram (layout is also copied if the Source Diagram has been saved).
There are additional keyboard shortcuts that you can use for Diagram Layout
|Find||Ctrl+Shift+G||Find the current diagram in the project browser|
|Find||Alt+G||Find the selected Element in the project browser|
|Find||Ctrl-U||List all the Diagrams the Element appears in.|
|Repeat||Shift + F3||Creates a new Element of the same type and stereotype as the previously created Element|
|Repeat||F3||Create a new Connector of the same type and stereotype as the previously created Connector|
Additional Tips and Tricks
- If you want all your new diagrams to include the diagram notes (name, package, author, version) in the upper right corner:
- EA 12.1: Tools (menu) -> Options -> Diagrams -> Show Diagram Notes (checked)
- EA 13: Start (ribbon) -> Workspace -> Preferences -> Preferences -> Diagram -> Show Diagram Notes (checked)
- If you do not want Sparx EA to auto group Elements when you move one Element “on to” another Element in your diagram, hold down the “Alt” key when moving elements.
- If you start working with one type of diagram, and decide that you’d rather it was a different type (and default Toolbox), you don’t have to recreate it, you simply need to go to:
- EA 12.1: Diagram (menu) -> Advanced -> Change Type
- EA 13: Layout (ribbon) -> Manage -> Change Type
- If you want to clearly indicate to your audience that a diagram is still a “draft” diagram, consider using the Hand Drawn Style for the diagram
- EA 12.1 and 13: first selecting the Diagram and on it’s context menu (right click), Properties -> Diagram -> Appearance -> Hand Drawn
- EA 13: Layout -> Appearance -> Hand Drawn
- Several of the Modeling Notations in Sparx EA support both the default “icon” shape for Elements (e.g. the Actor stick figure), and a rectangular style (the element is a rectangle with a stick figure icon in the upper left corner), you can enable the Rectangular Style for an Element by:
- first selecting the Element and on it’s context menu (right click) selecting for EA 12.1, 13 : Advanced -> Use Rectangular Notation.
- for elements where this option isn’t visible, starting in EA 13 you can turn off shape scripts entirely for a diagram: Diagram Properties -> Diagram -> Appearance -> Show Shape Scripts (unchecked)