Enterprise Architect version 15.0

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook  twitter  youtube   linkedin

Navigator_icon_with_name_70With EA Navigator version 2.4.12.0 you can now navigate from and to composite diagrams of an element.
Recently I’ve been working a lot with BPMN models. BPMN models make extensive use of the composite diagram mechanism in EA to drill-down on the processes and sub-processes.

In a classical UML model we usually place the composite diagram under the element, in which case finding the composite diagram, or finding the element(s) that have a diagram as composite diagram, is trivial. They are at the same location in the project browser.BPMN_Library_Model

In most BPMN models however there’s separation between model andlibrary where the library contains the elements, and the model the diagrams. In such a setup it suddenly becomes much harder to find the composite diagram (find in all diagram, then double click the element) and almost impossible to find the element(s) that have a specific diagram as composite diagram.

 

In other words drilling down is relatively easy, but drilling up becomes nearly impossible.

Navigate_Composite_diagramThis problem is now solved by the EA Navigator.  From the Business Process I can now easily navigate to the composite diagram, but more importantly, I can navigate back up to any elements that have this diagram set as their composite diagram.

 

More Information

More information about the EA Navigator add-in for Enterprise Architect can be found here:

Published in News
Wednesday, 22 August 2018 02:26

Add-In for Fault Tree Analysis

This FTA Add-In enables to write Fault Tree Analysis (FTA) diagram in Enterprise Architect. It offers some userful features like auto-layout.

 

- Installation

 

Please unzip the attached file, then right-click EAAddinSetup.bat file and select 'Run As Administrator'. If installation is succeeded, you can find 'FTA' menu item under Extension menu of Enterprise Architect.

This add-in works on Enterprise Architect version 13.0 or later.

 

- How to create FTA

 

Just the same as creating other type of diagrams. At first, create top-level intermediate event and then use the QuickLinker to add other events or gates.

You can set basic properties by double-clicking target object.

 

- Add-In features

This Add-In has two features, auto-layout and calculate probability.

Select root (target) object and call features by context menu, under 'Specialize' | 'FTA'.

 

- Updated

2015/12/25 fixed spelling mistake, and updated installer batch file to register add-in under HKLM

2018/08/22 updated DLL to support version 14.0 or later

2019/05/13 updated batch file to install the Add-in

Published in Community Resources
Saturday, 31 January 2015 07:59

EA-Matic a new add-in by Geert Bellekens

EA-Matic

EA-MaticLogo64

EA-Matic is an add-in for Sparx Enterprise Architect that enables rapid EA add-in development.

It uses the built-in scripting features of EA to relieve you of developing, building and deploying full-blown EA add-ins.
Aimed at corporate environments it greatly reduces the time to introduce new functionality.

With EA-Matic you can develop your EA add-in using nothing but EA, and deploy changes instantly to all model users.

The possibilities are endless. You can validate your own modelling rules, keep your model consistent by preventing the deletion of elements that are still used, add your own context menus, or make self-maintaining diagrams. The only limits are those of your imagination.

The table below shows how add-in development with EA-Matic differs from classic add-in development.

  EA-Matic Classic add-in development
Required tools Only EA Visual Studio, Sharpdevelop, or equivalent IDE
Installation of a new version Instantly available for all users without the need to install anything again on the workstations. Msi-deployment on all workstations
Languages VBScript, JScript, JavaScript VB, C#
Security access on development machine Normal user rights are enough. Local Administrator rights required.

Try and buy

Download EA-Matic and try it for free for 30 days   Buy EA-Matic from EAWorkplace

Download EA-Matic and try it for free for 30 days.

The evaluation version can be activated as full licensed version by entering a valid license key. No need to download and install another version.

EA-Matic is distributed through EAWorkplace. You should be registered and logged in to EAWorkplace in order to download or purchase.

Quantity Per seat Floating
1 – 4 € 50 € 70
5 – 19 € 46 € 63
20 – 100 € 42 € 60
100 + € 39 € 56

 

EA-Matic should be installed on all workstations that use EA, so you should have the same number of EA-Matic licenses as you have EA licenses.

Prerequisites

Examples

Usage

This one minute video will show how easy it is to create a new add-in for EA using EA-Matic

 
 

More info
 

More information can can be found on the authors website: http://bellekens.com/ea-matic/

 

Published in News

Introduction

 

Add-Ins are a very powerful means of extending Enterprise Architect's built-in functionality. However, in some cases you have a hard time navigating down to deeply nested items of your add-in menu in order to trigger their associated functions.

Wouldn't it come in handy to have the possibility of defining an arbitrary number of keyboard shortcuts that invoke custom functionalities of your add-in? Of course, it would and this tutorial presents how this can be achieved. 

Firstly, I'm going to explain which technical challenges existed and how they were tackled in order to get the solution running properly. This might be especially useful for add-in developers that want to grasp the concepts and toy with the notion of extending the feature with some cool stuff. In case you just want to get a hands-on guide on how to setup custom hotkeys for your add-in, feel free to skip this section. Finally, you'll find the used C# source files attached to this tutorial. 

 

Technical Challenges

 

Class Diagram

 

Registering hotkeys for global usage

 

Before the add-in is able to react to pressed keyboard combinations, we first have to register them somewhere so that the operating system, which in fact processes incoming keyboard actions, knows who should be notified in case something is pressed on the keyboard. For this purpose, Windows provides a native interface located in user32.dll. For the task of (un-)registering hotkeys, two methods are of interest to us:

 You can see that in each case a pointer to a specific window handle is needed for (un-)registration, i.e. global hotkeys can only be registered to existing windows. Note that it doesn't play a role if that window is currently active or not. Since the registration's scope is globally, there must only be one window associated with a specific hotkey at a time implying that registrations can fail if that hotkey combination is already taken by another tool. Keep that in mind in case the functionality is not invoked properly. 

In a nutshell, we need a window that has the following properties:

  1. It should be a descendant of System.Windows.Forms.IWin32Window to serve for hotkey registration
  2. It needs to be extendable in a way that we can process incoming window processing events

 

But back to Enterprise Architect scope:

The first idea coming to my mind was getting the window handle of the Enterprise Architect application itself. Recently, Geert Bellekens shared his way of achieving this with the community (Link to forum topic). Unfortunately, it cannot be used for registering hotkeys due to point 2 of the preceding list, because at least I didn't find any possibility to override the window processing event handler for the Enterprise Architect main window class.

Thus, the approach taken here is to create a custom System.Windows.Forms.Form which has all the needed properties by default. Due to its purpose of hotkey processing, it is made invisible to the user. The class is called InvisibleHotkeyForm in the above diagram. It has proven useful to create and show the form in the EA_Connect() event handler of the add-in's main class.

In order to finally register hotkeys, a list of hotkey definitions needs to passed to the InvisibleHotkeyForm constructor. Each hotkey definition is an instance of the Hotkey class, consisting of three properties:

  • Key is the character being pressed within the combination, e.g. A in Ctrl+Shift+A. It is represented by the enumeration System.Windows.Forms.Keys
  • Modifiers are the modifiers within the combination, e.g. Ctrl+Shift in Ctrl+Shift+A. It is represented by a disjunction of bitvalues of the enumeration Modifiers, that contains a bit pattern for each modifier
  • Handler is a C# delegate that holds a function pointer to the user-defined function which should be invoked when pressing the hotkey

 

After instantiating and showing the InvisibleHotkeyForm, the existing classes take care of the rest of the work.

 

Getting notified of pressed key combinations and handling them

 

Having created an instance of InvisibleHotkeyForm, the Windows API has registered it to receive window processing events. The class System.Windows.Forms.NativeWindow, which is a base class of System.Windows.Forms.Form, declares the method void WndProc(ref Message m), which is invoked by the operating system, when a window processing event has occurred. The overriden implementation of it  in InvisibleHotkeyForm is: 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
protected override void WndProc(ref Message m)
{
    if (m.Msg == Hotkey.WM_HOTKEY_MSG_ID)
    {
        foreach (Hotkey key in _hotkeys)
        {
            if (key.IsPressedKeyCombination(m.LParam))
            {
                key.Handler();
                break;
            }
        }
    }
    base.WndProc(ref m);
}

 

Since there exist more window processing event types besides hotkey events, we have to check for that first. After that we ask each hotkey in the list, if it's associated with the pressed hotkey combination, which is encoded in the LParam property of the window processing event message. If there is a match with one of our defined hotkeys, we invoke its delegate function that contains the custom behavior. Note that currently, the delegate type neither has parameters nor a return type, since it should only be an entry point for triggering further add-in behavior. However, this could be customized with minor efforts.

 

Dealing with multiple running instances of the Enterprise Architect application

 

Because of the fact that we deal with global hotkeys that are restricted to be registered to only one window, the whole approach fails as soon as we open up two instances of the Enterprise Architect application. The reason is that each instance is running in its own process and therefore the add-in is loaded once for each instance, which means we have also two instances of InvisibleHotkeyForm that try to register the same set of hotkeys. This of course succeeds only with the first Enterprise Architect application instance.  

In order to tackle this problem, I assumed that the user always works in only one Enterprise Architect instance, which implies that its main window is active only for that time. In this manner, each add-in instance has to be aware, if its Enterprise Architect instance's main window is currently active or not.

Upon this information the add-in can decide, if:

  • it has to register its hotkeys as soon as its Enterprise Architect window gets focused by the user
  • it has to unregister its hotkeys as soon as its Enterprise Architect window looses focus

Thus, the hotkeys are only registered for the focused Enterprise Architect instance and the registration in the operating system never fails. 

Technically, this is achieved by first capturing the process id of the Enterprise Architect instance during startup. Next, a System.ComponentModel.BackgroundWorker is used for periodically polling the process id of the process whose window handle is currently focused by the user. Finally, we have to compare these process ids and determine, whether the Enterprise Architect instance got focus or lost focus in order to register or unregister the hotkeys.

The implementation of the DoWork event handler of the background worker performing this task is:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
void worker_DoWork(object sender, DoWorkEventArgs e)
{
    int activeId = ActiveProcess.GetActiveProcess().Id;
    if (_lastActiveProcessId == activeId)
        return;
    if (_thisProcessId == activeId) //This EA instance got focus
    {
        BeginInvoke((MethodInvoker)RegisterHotKeys);
    }
    else if (_thisProcessId != activeId) //This EA instance lost focus
    {
        BeginInvoke((MethodInvoker)UnregisterHotKeys);
    }
    _lastActiveProcessId = activeId;
}

 

In the function implementation's first line, the process id of the process with active window is retrieved by invoking ActiveProcess.GetActiveProcess(). This function again makes use of two native methods of the user32.dll, namely

 

How can I use this feature in my add-in?

 

First, you have to copy the folder src/GlobalHotkeys of the attached archive to your project and possibly adjust the namespace names of its classes according to your project structure.

An example for the integration of the hotkey feature into your add-in is given below. For modularity reasons, I created a static class that encapsulates all hotkey definitions together with their handler functions. Note that during the definition of the modifiers for the hotkey you have to use the bitwise OR operator and not the logical OR operator to combine different modifiers. In addition, it's theoretically also possible to define single characters as a hotkey, i.e. no modifiers are needed (Modifiers.NoMod) then to activate it.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using EA;
using GlobalHotkeys;
 
namespace Addin
{
    class AddinMainClass
    {
        public String EA_Connect(IDualRepository repository)
        {
            HotkeyHandlers.SetupGlobalHotkeys();
            return "";
        }
    }
 
    internal static class HotkeyHandlers
    {
        public static void SetupGlobalHotkeys()
        {
            List<Hotkey> hotkeys = new List<Hotkey>
            {
                new Hotkey(Keys.D1, Modifiers.Ctrl | Modifiers.Shift, HandleHotKey1), //Keys.D1 is the digit 1 on the keyboard
                new Hotkey(Keys.D2, Modifiers.Ctrl | Modifiers.Win | Modifiers.Alt, HandleHotKey2),
                new Hotkey(Keys.A, Modifiers.NoMod, HandleHotKey2)
            };
 
            Form hotkeyForm = new InvisibleHotKeyForm(hotkeys);
            hotkeyForm.Show();
        }
 
        private static void HandleHotKey1()
        {
            //Perform some action
        }
 
        private static void HandleHotKey2()
        {
            //Perform some other action
        }
    }
}

 

 Conclusion

 

This tutorial provided the knowledge and practical instructions to enrich Enterprise Architect add-ins with the possibility to define and react to custom hotkeys. In addition to that, it should bring the fact home to add-in developers that searching for solutions beyond the .NET layer (=native Windows interfaces) highly extends the space of possibilities. Finally, I want to encourage the readers of this tutorial to give me feedback in any shape to improve its quality.

 

Source Files

 

Link: https://dl.dropboxusercontent.com/u/15260967/GlobalHotkeysEA.zip 

Published in Community Resources
Friday, 18 June 2010 10:27

Free and Open-Source add-in EA Navigator

The EA Navigator is a free and open-source (BSD License) add-in for Sparx Systems Enterprise Architect that makes the life of any Enterprise Architect user a lot easier.

It allows for quick navigation between different elements in a model, especially between those elements that are not easily found using the standard EA features.

Using the dockable add-in window it retains a history of the 50 last selected model elements, and shows the important related elements at a glance.

The EA Navigator is part of the Enterprise Architect Toolpack

It allows you to navigate between:

  • Operations and Sequence/Communication diagrams
  • Operations and their implementation (Behavior)
  • Operations and CallOperationActions
  • Types and Parameters
  • Types and Attributes
  • Tagged Values and the elements they reference
  • Elements and their owner

And to any Fully Qualified Name (FQN) or GUID that has been copied to the clipboard.

Prerequisites

Download

download button v2.4
EA Navigator older versions

Docked window

Once installed there should be a new menu option Navigate in the Add-Ins/Extensions menu.

If this option is not visible then something must have gone something wrong during the installation.

The EA Navigator will now show its functions depending on the type the element that is selected. You can either access its function using the main menu, or using the right-click context menu.

In order to enable the “docked window” feature of the EA navigator check the optionExtensions|Add-In Windows

The Navigator window will now show up somewhere in your application

EANavigator_docked

Icons

 

Toolbar Actions

Toolbar

The toolbar on top of he docked contains the following actions, from left to right:

Select in Project Browser

Toolbar_selectInBrowser

This option will select the selected element in the EA Navigator window in Enterprise Architect’s project browser. (similar to Alt-G from a diagram)

Open Properties

Toolbar_openProperties

Opens the properties dialog for the selected element

Add to Diagram

Toolbar_addToDiagram

The add to diagram button will add the selected element in the EA Navigator tree to the currently opened diagram.

The element will be added to the top left corner of the diagram.

Navigate to Fully Qualified Name

Toolbar_toFQN

Selects the element that matches the node path (FQN) in the clipboard. If there is no valid FQN string in the clipboard the EA Navigator will show a dialog asking for the FQN.

Select Element from GUID

Toolbar_selectGUID

Each item, elements, attributes, operations, diagrams, etc… has a unique id in the form of a GUID (example: {C06EF618-D57C-4f63-BF64-F5A5265694AE}).

Pressing the Navigate to GUID button will allow you to go to that element using it’s GUID. If there’s already a GUID in your windows clipboard then the EA Navigator will use that one. If not the EA navigator will show a dialog where you can past (or type) the GUID.

For elements shown in the project browser you can easily copy the GUID to your clipboard using the context menu Copy Reference|Copy Node GUID to Clipboard

CopyGUIDClipBoard

Options

Toolbar_options

Opens the options dialog allowing you to tune the EA Navigators behavior to your liking.

Quicksearch_options

All options are stored in the users profile, so different users on the same machine can have different options

About

Toolbar_about

Opens the About dialog

About dialog

Quicksearch

Toolbar_Quicksearch

Start typing in the Quicksearch box and you will get a list of all things in the model who’s name start with whatever you have typed.

Hovering an item in the dropdown list will show you it’s fully qualified name in the tooltip.

Quicksearch_dropped

Selecting an item will select it in the EA Navigator tree.

The Quicksearch also comes with a whole bunch of options, you can choose which types of items to search for, and with the Actions you can choose what to do when an item from the Quicksearch is selected.

Navigation options

Below you find all navigation options grouped by the element(s) they are available on

All

  • Owner
    Selects the owner of the selected element

 All Except diagrams

  • … Tags
    Shows the elements referenced by the owned “RefGUID” style tagged values.

    These tagged values translate to the following options in the EA Navigator window

  • Referencing Tagged Values
    Navigates to the opposite direction of the … Tags. Shows all RefGUID style tagged values that reference the selected element
    .
  • Link to Element Feature
    EA has the possibility to define links between features of an element such as Attributes or Operations using the Connect to Element Feature feature, which is very useful in a lot of situations.Visually EA shows which feature is linked using brackets next to the connected Attribute or Operation.

     

    LinkToElementFeature

    The is all nice and dandy, but the downside of the story is that you can only see which features are linked by looking at the diagram.

    Now with the EA Navigator you can simply navigate from one feature to the other

    NavigateLinkToElementFeature

Operation

  • Diagrams
    Shows all sequence diagrams that contain a message calling this operation or contain an Action that calls this operation.
  • Parameter Types
    Shows all types of the parameters of this operation.
  • Calling Actions (not for messages)
    Shows the CallOperationActions calling this operation
  • Implementation
    Shows the diagrams owned by the behavior of this operation.

Message (in sequence diagram)

  • Operation
    Select the called operation in the project browser.
  • Diagrams
    Shows the sequence diagrams for the called operation?
  • Parameter Types
    Shows the parameter types for the called operation
  • Implementation
    Selects the Behavior element for the called operation in the project browser and opens all diagrams owned by this Behavior.

Classifier

  • Dependent Attributes
    Shows all attributes that use the selected classifier as type
  • Dependent Parameters
    Shows all parameters that use the selected classifier as type

Attribute

  • Type
    Shows the type of the attribute.

Sequence Diagram

  • Operations
    N
    avigate to all operations called on the diagram.

Open Diagrams dialog

When the function Diagrams is selected the Open Diagram dialog will open

From this dialog you can select the diagrams you wish to view and click the Open button to open the selected diagram in EA.

You can also double-click on a single diagram, which will also open the diagram.

Select Elements dialog

The Select Elements dialog will be shown if a list any other type of elements need to be shown.

Clicking the Select button, or double-clicking an element in the list will select that element in the project browser.
Elements that are grayed-out are non-selectable elements such as primitives.

Other Resources

Published in Community Resources
Page 2 of 2