Documente Academic
Documente Profesional
Documente Cultură
Tricks
Probably the most popular book
about Enterprise Architect in the
world
Peter Doomen
This book is for sale at http://leanpub.com/entarch
Introduction . . . . . . . . . . . . . . . . . . . . . 1
Preface . . . . . . . . . . . . . . . . . . . . . . . 1
Copyright notice . . . . . . . . . . . . . . . . . 2
Thanks to . . . . . . . . . . . . . . . . . . . . . 2
About the author . . . . . . . . . . . . . . . . . 2
Online . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 3: Diagrams . . . . . . . . . . . . . . . . 54
Trick 21: Copy a diagram to the clipboard . . . . 56
Trick 22: Same size . . . . . . . . . . . . . . . . 59
Trick 23: Save as shortcut . . . . . . . . . . . . . 62
Trick 24: Change diagram type . . . . . . . . . . 63
Trick 25: Package on a diagram . . . . . . . . . 66
Trick 26: Quick zooming . . . . . . . . . . . . . 68
Trick 27: Shallow or deep copy? . . . . . . . . . 69
Trick 28: A legend . . . . . . . . . . . . . . . . . 72
Trick 29: Status colors on diagrams . . . . . . . 76
Trick 30: Manual layouting . . . . . . . . . . . . 80
Copyright notice
© 2011 Peter Doomen. Sparx and the names of Sparx’s
products referenced in this book are trademarks or regis-
tered trademarks of Sparx Systems Pty Ltd.
Thanks to
Thanks to Estelle Bell and Scott Hebbard from Sparx Sys-
tems for their help. Thanks to Jonathan Feinberg for his
famous Wordle application that generated the word clouds
in this book. Thanks to Helmut Ortmann for providing
me with additional tricks, and to Philippe Backx, Thomas
Kilian and Ramsey Millar for their support in marketing
this book. Thanks to my family and colleagues for their
support and advice. Special thanks to my colleague Stephan
for proofreading the manuscript and to colleague Herman
for tip 9 in bonus chapter 2.
Online
Chapter 1: Elementary,
my dear Watson
Chapter 1: Elementary, my dear Watson 6
When you are building a model, more often than not you
need exactly the same type of element more than once.
Instead of returning to the toolbox every time, just press
“ctrl” and click on the diagram. For example: you need five
“objects” to appear on the diagram.
Screenshot 1-1
This trick goes right into the heart of what a modeling tool
is about: modeling instead of just drawing. The difference?
When modeling, you understand there is a difference be-
tween the model and the diagrams, while when you are just
drawing the model and the diagram are the same. Let’s say
you are building a model for an organization that releases
the wine magazine “Vinimble” six times a year. You have
modeled the subscription process, a part of the application
landscape, and some roles that work with the software to
support the business process. The model quickly becomes
complicated. The solution? Split up the diagram in separate
diagrams, each showing a part of the model. The function
“add related elements” is very useful for that. For example,
let’s focus on the “Staff” role. Drag the “Staff” role from the
model tree to a new diagram. Right click on it and choose
“Advanced | Add | Related elements”.
Chapter 1: Elementary, my dear Watson 8
Screenshot 2-1
Screenshot 2-2
For the moment, just press OK. The result is a diagram with
all elements directly linked to the “Staff” role.
Chapter 1: Elementary, my dear Watson 9
Screenshot 2-3
The default for this option is two-way, but you can limit
this to source->target or target->source.
The same as link type, only that you limit the action
depending on the type of the connected elements.
You probably will want to turn this option off unless you
trust the autolayout function of Enterprise Architect really
well. I don’t, so I turn it off unless I have a diagram that
has not been layouted by hand so far.
Limit to Namespace
Screenshot 2-4
Screenshot 3-1
It not only shows the element, but also the connector type
and other information you often need.
Select an element on the diagram. Go to the Relationships
Chapter 1: Elementary, my dear Watson 13
Screenshot 3-2
Screenshot 3-3
Screenshot 4-1
Screenshot 5-1
Screenshot 5-2
Screenshot 5-3
Then we are going to use our new style. Select the activity
“Register new subscriber” and click on the styles list. Select
“BusProcAut” and the activity turns light green.
Chapter 1: Elementary, my dear Watson 19
Screenshot 5-4
Screenshot 6-1
Screenshot 7-1
Screenshot 7-2
Once you will have done real hard work modeling a piece
of reality or of your dreams, you will want to protect
it against unwanted changes. For example changes by
your project team colleagues who always argue with you
about… well, you know what I mean. That’s the right
time to start locking your work. Select the element to
protect, right click on it and press “lock element”. Until you
get the lock off, you and others won’t be able to change
its properties (name, notes etc). The OK button on the
properties window is grayed out.
Chapter 1: Elementary, my dear Watson 24
Screenshot 8-1
Screenshot 9-1
Screenshot 9-2
Why would you do that? You don’t use every element every
day. Therefore, sometimes it can be hard to remember
where in the toolboxes an element is hidden. In this dialog,
when you click the “Type” drop down box, a list with lots
of elements shows up, making it easier to find the right one.
Chapter 1: Elementary, my dear Watson 27
Screenshot 10-1
Screenshot 10-2
Chapter 2: Connecting
things
Chapter 2: Connecting things 31
Screenshot 11-1
Just like you can repeat the last element you drew (see Trick
1: Adding an element of the same type), you can repeat a
connector. The shortcut is even simpler: just press F3. Then
point to the source element and the cursor will indicate that
you can start drawing the connector. You really need to
memorize that one, because you’ll find yourself drawing
the same connectors over and over again.
Chapter 2: Connecting things 33
Screenshot 12-1
Screenshot 13-1
Screenshot 13-2
Screenshot 14-1
Screenshot 14-2
Screenshot 15-1
I suggest you turn this feature off. After a while, you will
know exactly what happens when you press delete so you
save time again. Then which default option should you
choose? Hiding the relationship or deleting it altogether?
It depends:
Chapter 2: Connecting things 39
Screenshot 15-2
Complicated diagrams
Screenshot 16-1
Screenshot 16-2
Screenshot 17-1
Screenshot 17-2
Screenshot 18-1
relation explicitly:
Screenshot 18-2
Screenshot 18-3
Screenshot 19-1
Screenshot 19-2
It actually just means that the new copy will inherit all
local connections from its parent element. In this example,
the “Editor in chief” was copied and also both links to the
business process were automatically copied, but not the
aggregation link to the VinimbleGroup element, since it is
not a local connection.
Screenshot 19-3
Screenshot 19-4
Chapter 2: Connecting things 51
Screenshot 20-1
Screenshot 20-2
Screenshot 20-3
It will show not only the name of the feature, but also the
notes attached to it, exactly what we had in mind.
Chapter 3: Diagrams 55
Chapter 3: Diagrams
Wordle 3
Chapter 3: Diagrams 56
Screenshot 21-1
If you don’t like the frame around the diagram, you can
turn this off via “Tools | Options”. Remove the checkmark
before “On Clipboard Images”.
Chapter 3: Diagrams 58
Screenshot 21-2
Screenshot 21-3
Experienced users will know this one for sure, but even
they will underestimate the visual impact of giving dia-
gram elements the same size.
Chapter 3: Diagrams 60
Screenshot 22-1
Screenshot 22-2
Screenshot 22-3
This trick can save you time when you are working on
a project and you have different hats on. For example,
you are business analyst but also technical architect. As a
business analyst, you would probably need diagrams like
the organizational model, the business processes and the
requirements model. As a technical architect, you’ll open
the component diagram, the technical architecture diagram
and the like. Did you know you can have two shortcuts
to the same Enterprise Architect model, each leading to a
different set of diagrams open by default? Here’s how to do
that.
Step 1: In the File menu, choose “Save As”
Chapter 3: Diagrams 63
Screenshot 23-1
Screenshot 24-1
Screenshot 24-2
Screenshot 24-3
Screenshot 24-4
Screenshot 25-1
Screenshot 25-2
Screenshot 26-1
Screenshot 27-1
Screenshot 27-2
Screenshot 27-3
Screenshot 28-1
Screenshot 28-2
Screenshot 28-3
own:
Screenshot 28-4
Screenshot 28-5
Screenshot 29-1
Screenshot 29-2
Proposed
Validated
Approved
Implemented
Screenshot 29-3
Screenshot 30-1
Sizing elements
Aligning elements
Spacing elements
Screenshot 30-2
Screenshot 30-3
Note that only the middle elements will move when you
space items across. The left and the right item keep their
places. The same holds for the top and the bottom elements
when spacing vertically.
Chapter 4: Toolbox, types and tree 85
Chapter 4: Toolbox,
types and tree
Wordle 4
Chapter 4: Toolbox, types and tree 86
Screenshot 31-1
Screenshot 31-2
Create a package
Screenshot 32-1
Add metaclasses
Screenshot 32-2
Screenshot 32-3
Screenshot 32-4
Screenshot 33-1
Status
Constraint
Constraint status
Requirement
Scenario
Screenshot 33-2
Screenshot 34-1
Screenshot 34-2
Of course, you can start with any value you want. If you
input “0100” as a counter value, the first issue will be “0100”,
the next one “0101” and so on. You don’t have to give a
suffix and a prefix: neither of them or one of them is okay
too. Put a checkmark before “Active”, confirm with “Save”
and you will be able to use the auto name counter.
Chapter 4: Toolbox, types and tree 98
Screenshot 34-3
Screenshot 35-1
You could for example draw a nice picture for all actors that
belong to the Vinimble staff. When you use a stereotype, it
will automatically be the default appearance for all staff
actors. Here’s how to do it:
Step 1: Use any painting tool that supports metafiles (en-
Chapter 4: Toolbox, types and tree 100
Screenshot 35-2
Screenshot 36-1
Screenshot 36-2
As you can see, the spin control does not allow other
values than the ones we like to have as values for the tag
BusinessValue. Here’s how to do it:
Step 1: Click Settings - UML and choose the tab Tagged
Value Types.
Step 2: Enter a new tagged value type. Name it Business-
Value and give a description.
Step 3: As detail, add the following lines: Type=Spin; Up-
perBound=3; LowerBound=1;
Step 4: Press save.
Step 5: Open the properties of a requirement, choose the tab
with tagged values, and add the tag “BusinessValue”. You’ll
see the spin controls appearing on the screen.
Chapter 4: Toolbox, types and tree 103
Screenshot 36-3
Screenshot 37-1
the profile (see Trick 32: Create your own). If you now add a
requirement from your own toolbox, it will have the tagged
value “BusinessValue” and it is set to “medium”. Nice, but
it can be even nicer. Remember that we want to protect our
users from typing in wrong data. So we’ll limit the options
a business value can have. Add BusinessValueOptions (an
element of type “enumeration”) to the profile diagram and
add as its attributes the value list. In our example, we
would add three attributes to the enumeration “Business-
ValueOptions”: “Low”, “Medium” and “High”. Also indicate
“BusinessValueOptions” as the “Type” for the Business-
Value attribute of the MyRequirement element.
Screenshot 37-2
Re-import the profile after having deleted the old one, and
you can start using the BusinessValue tagged value with
limited options.
Chapter 4: Toolbox, types and tree 106
Screenshot 37-3
Screenshot 38-1
If you work with tagged values a lot, you can open the
Tagged Values pane and dock it to one side of the workspace.
The shortcut is ctrl+shift+§ but you’ll probably use the
menu View - tagged values.
There are at least two good reasons to sort the model tree
in a convenient way:
Output
Screenshot 39-1
Screenshot 39-2
Then use the green arrows on top of the model tree to put
items in the right order.
Screenshot 39-3
Screenshot 39-4
Screenshot 40-1
Chapter 4: Toolbox, types and tree 111
Screenshot 41-1
Screenshot 41-2
Screenshot 41-3
Chapter 5: A bit more advanced 116
Screenshot 41-4
Screenshot 42-1
Screenshot 42-2
Screenshot 42-3
Screenshot 43-1
Screenshot 43-2
Screenshot 43-3
Screenshot 43-4
Screenshot 44-1
Screenshot 44-2
Screenshot 45-1
Screenshot 45-2
Screenshot 46-1
Screenshot 46-2
Screenshot 46-3
Screenshot 47-1
Ease of use
Links
You can put links to elements from the model tree in the
discussion forum, so it’s easy to point to elements that need
work.
Chapter 5: A bit more advanced 133
Screenshot 48-1
Screenshot 48-2
Rich text
Glossary definitions
Standard workflow
Screenshot 48-3
Screenshot 49-1
Warning:
Not all changes will lead to the desired results. Always have
a backup copy of your model, always verify that the model
is not corrupt and that there are no undesired side effects.
Use this trick only if you understand how the Enterprise
Architect datamodel works. If you don’t feel safe, don’t do
it.
Chapter 5: A bit more advanced 138
Screenshot 50-1
Screenshot 50-2
Screenshot 1-1
Screenshot 1-2
Of course this works with all search terms, not just “todo:”.
You could even use @tags if you like (like, “@john”, to
indicate John has to work on this). Unfortunataly, hashtags
won’t work (“#urgent”) so I stick with the “:” marker.
Screenshot 2-1
Now you can change the name if you like. You probably
will, since having two elements with the same name does
not make much sense from a modeling perspective. It can
only create confusion.
The element and its properties, but not its links, will be
copied.
You can repeat the shift+ctrl+v to get additional copies.
Screenshot 3-1
Screenshot 3-2
Screenshot 3-3
Screenshot 4-1
Screenshot 4-2
Screenshot 4-3
Screenshot 5-1
Screenshot 5-2
Then select all cells by clicking the topmost left cell, press-
ing shift and clicking the bottom right cell. Release the shift
button and right click any of the selected cells. Then choose
“Create Relationship | UML::Dependency”:
Screenshot 5-3
Screenshot 5-4
Screenshot 6-1
Screenshot 6-2
Screenshot 7-1
Screenshot 7-2
Screenshot 7-3
Screenshot 8-1
The dialog that opens now lets you update the statuses of
all the elements, but also the version and phase:
Bonus Chapter 1: various extra tips 157
Screenshot 8-2
Screenshot 8-3
Bonus Chapter 1: various extra tips 158
Screenshot 9-1
Implicit
Screenshot 10-1
Explicit
Screenshot 10-2
Screenshot 10-3
Screenshot 10-4
Bonus Chapter 2: Still
more various extra tips
Trick 1: semi-batch creation of
elements
Screenshot 1-1
Screenshot 2-1
Screenshot 2-2
Step 3: Sort the list view: open the diagram in list view, right
click and choose “Add tag value column”
Bonus Chapter 2: Still more various extra tips 171
Screenshot 2-3
Extra tips
Screenshot 2-4
Screenshot 3-1
Screenshot 3-2
Notepad. Save the file as a csv file and import it into the
spreadsheet application.
Screenshot 4-1
Screenshot 4-2
Screenshot 4-3
Extra tips
Screenshot 5-1
Screenshot 5-2
Extra tips
Screenshot 6-1
Screenshot 6-2
For example, let’s add a step. If you are done, save the
diagram.
Bonus Chapter 2: Still more various extra tips 183
Screenshot 6-3
Screenshot 6-4
Screenshot 7-1
Screenshot 7-2
Screenshot 7-3
Screenshot 7-4
Screenshot 7-5
Sixth step: the final result. As you can see, most elements
have been translated correctly, be it that only the appear-
ance is correct (color, shape, position and connections). If
I want the element type to be correct as well, I need to
instruct the creator of the Visio diagram to work with an
other Visio stencil (UML Activity) or I can tweak the results
Bonus Chapter 2: Still more various extra tips 190
after import.
Screenshot 7-6
Basic shapes
UML Activity
Screenshot 7-7
Screenshot 8-1
Attribute
Diagram
EA Command
Element
File
Help
Matrix
Operation
Package
Search
Team Review
Website
Screenshot 9-1
Screenshot 9-2
Screenshot 9-3
Extra tip
Screenshot 10-1
Now you can give the working set a name (like “Business
analysis”) and indicate which diagrams should be part of
it.
Bonus Chapter 2: Still more various extra tips 202
Screenshot 10-2
Add other
Screenshot 10-3
Screenshot 10-4
Once you have created a working set, you can start using it.
Right click the working set and choose one of these actions:
Bonus Chapter 2: Still more various extra tips 204
Before you start reading the rest of this chapter, make sure
you know these steps by heart, since you will find yourself
repeating them over and over. Especially the export-import
steps.
Bonus Chapter 3: Building your own toolbox 206
Screenshot 1-1
Screenshot 1-2
Screenshot 2-1
Bonus Chapter 3: Building your own toolbox 209
Screenshot 2-2
Bonus Chapter 3: Building your own toolbox 210
Screenshot 2-3
Once your toolbox starts to grow, you will feel the need
to have separate icons for the elements and connectors in
your toolbox.
Bonus Chapter 3: Building your own toolbox 211
Screenshot 3-1
Screenshot 3-2
Screenshot 3-3
Delete the old profile, import the new and your icons
should all be set up!
Screenshot 4-1
Bonus Chapter 3: Building your own toolbox 215
Screenshot 5-1
Screenshot 5-2
Screenshot 5-3
Screenshot 5-4
Screenshot 6-1
Screenshot 6-2
1 shape main
2 {
3 // draw a dashed line
4 noshadow=true;
5 setlinestyle("SOLID");
6 hidelabel("MiddleBottomLabel");
7 moveto(0,0);
8 lineto(100,0);
9 }
10
11 shape target
12 {
13 // draw an arrowhead at the target end
14 rotatable = true;
15 noshadow=true;
16 moveto(0,0);
17 lineto(6,4);
18 moveto(0,0);
19 lineto(6,-4);
20 }
1 shape main
2 {
3 // draw a dashed line
4 noshadow=true;
5 setlinestyle("DASH");
6 moveto(0,0);
7 lineto(100,0);
8 }
9
10 shape target
11 {
12 // draw an arrowhead at the target end
13 rotatable = true;
14 startpath();
15 moveto(0,0);
16 lineto(16,6);
17 lineto(16,-6);
18 endpath();
19 fillandstrokepath();
20 }
Screenshot 6-3
Screenshot 6-4
Screenshot 7-1
Screenshot 7-2
Screenshot 7-3
1 shape main
2 {
3 // draw a line
4 noshadow=true;
5 moveto(0,0);
6 lineto(100,0);
7 }
8
9 shape target
10 {
Bonus Chapter 3: Building your own toolbox 228
Screenshot 7-4
In rare cases, you might need the left side of the quadrant.
The shape, mostly a connector, will then overlap the ele-
ment it points to. This hourglass shape is an example.
1 shape main
2 {
3 // draw a line
4 noshadow=true;
5 moveto(0,0);
6 lineto(100,0);
7 }
8 shape target
9 {
10 // draw an hourglass @ target end
11 rotatable = true;
12 startpath();
13 moveto(0,0);
14 lineto(10,10);
15 lineto(-10,-10);
16 lineto(10,-10);
17 lineto(-10,10);
18 lineto(10,10);
19 endpath();
20 fillandstrokepath();
21 }
Screenshot 7-5
1 shape main
2 {
3 noshadow = "true";
4 h_align = "center";
5 v_align = "top";
6 rectangle(0,0,100,100);
7 println(#NAME#);
8 }
Screenshot 8-1
What to do if you want some text, let’s say the name of the
shape, to appear on the bottom of the shape, while another
label, such as the stereotype, is put on top? Then you will
have to work with subshapes. An example script shows you
the way:
1 shape main {
2 rectangle(0,0,100,100);
3 addsubshape("stereotypeshape", 100, 80);
4 addsubshape("nameshape", 100, 80);
5
6 shape stereotypeshape {
7 h_align = "center";
8 println("#stereotype#");
9 }
10
11 shape nameshape {
12 h_align = "center";
13 println("#name#");
14 }
15 }
Screenshot 8-2
• middletoplabel
• middlebottomlabel
• lefttoplabel
• leftbottomlabel
• righttoplabel
• rightbottomlabel
Screenshot 9-1
Screenshot 9-2
1 shape main
2 {
3 // draw a line
4 noshadow=true;
5 hidelabel("MiddleBottomLabel");
6 moveto(0,0);
7 lineto(100,0);
8
9 }
10 shape target
Bonus Chapter 3: Building your own toolbox 236
11 {
12 // draw an hourglass @ target end
13 rotatable = true;
14 startpath();
15 moveto(0,0);
16 lineto(10,10);
17 lineto(-10,-10);
18 lineto(10,-10);
19 lineto(-10,10);
20 lineto(10,10);
21 endpath();
22 fillandstrokepath();
23 }
Screenshot 9-3
Notes
Screenshot 10-1
From time to time, you will see that the full MDG technol-
ogy gets lost. It appears to be beyond repair. Or is it?
This little trick seems to work. Open the UML Types dialog
(“Settings | UML Types…”). Then check the stereotypes you
created. Probably you will see that the shapescripts got de-
selected. Reselect them, then regenerate the MTS file with
the MDG Technology wizard and the MDG technology will
work again!
Bonus Chapter 3: Building your own toolbox 239
Screenshot 10-2
Note
shortcuts