Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Guillaume

Pages: [1] 2 3 ... 41
General Board / Re: Step by step Guide
« on: May 18, 2018, 04:24:36 pm »
Hi Pierre,

For requirements gathering, it is very common to create a model with separate branches (packages in EA) for Functional and Non-Functional requirements (see FURPS for an example of requirements classification). Requirements can be updated in EA and/or via Excel export/import. It is also important to think about traceability with your other modelling artefacts.

With EA, you have all types of diagrams you need incl Requirements, but you always need to define a suitable Model structure. Good examples are shared by the users community or also provided by Sparx in the EA Example (with EA 13, open START > Help > Open the Example Model. In the project open Analysis and Business Modeling > Requirements Model). This is very often where Sparx partners come into action with advice & training services.
For some specific needs, requirements can be tailored with stereotypes (UML profile) e.g. to add additional fields such as RefID, Category, etc.

I don't use Project Management features as dedicated tools like JIRA and others are more suitable (EA is a very open tool making it possible to integrate with other tools).

For test cases, it can be used but again based on your need.

Please note about the upcoming EA users gathering on the 8th of June in London where you can follow useful presentations and meet experienced EA users and experts:


I submitted  a feature request for a new method to refresh the script tree.


I found an easier option (in my opinion) by calling a function at the beginning of each script that copies its content/code to a dedicated "Run Last" script (with separate versions for the Project Browser and Diagram).

It works yet I can't find a way round an annoying issue: the screen tree list must be refreshed by the user (or the project closed/opened) so the updates are taken into account (see my related post here:,39778.0.html).


I have a script that carries updates in the scripts list. To see the changes, I have to click on the Refresh Script Tree button (Scripting view) or restart the project.
Is there a way to run this via the API, perhaps with the undocumented Repository.CustomCommand  method?


Hi Nizam,

Thanks for the links.


Is there an EA project or a diagram export of all class diagrams matching EA API Object Model e.g. Repository, Element, Package, etc class with properties and methods as documented in EA user guide e.g. Repository + methods like GetAttributeByGuid, Get ElementByGuid, etc.?

At the moment I only need it for presentation purposes but it would be useful to have it as a reference guide.
Perhaps a UML model already exists at Sparx to maintain the API (it could be included in the Example project.)

Note that I managed to generate a model via a Reverse Engineering on the InteropEA dll file. It is a good start, yet it would be useful to have some links from properties like Repository.Elements to the type of the collection's objects e.g. ElementClass, and perhaps definitions copied from the user guide.


Hi Helmut,

You're right and I have implemented a feature for a client with eaUtils which is available in a Portable Install edition (thanks to your info via this forum).
So I have a workaround if I add this "run last script" in eaUtils, however I think it would be nice to have it natively in EA.

Hi Simon,

Thank you for your feedback.
In the current scenario, we use scripts as users don't have the admin rights to install additional software on their PC.

I looks like the best option would be to treat it as a new EA feature to improve the user experience.


I'm trying to find a way to run a script that will itself call the last script used.
Let's say that in the Package scripts, you have
- RunLast
- ScriptA
- ScriptB

If I run ScriptA, it will store this ref somewhere in EA.
Calling RunLast will retrieve the ref and run ScriptA...

The following does not seem to be feasible:
- have a dynamic include (!INC) on the script found from the ref
- call this script main function (e.g. OnProjectBrowserScript) when the group and script names are set as variables e.g. groupName.scriptName OnProjectBrowserScript

Do you know if there is a solution to achieve that?

Note: I thought of an option that would involve the following:
- rename each script's main function e.g. OnProjectBrowserScriptA, OnProjectBrowserScriptB, OnProjectBrowserScriptC
- include all scripts in the RunLast Script : !INC GroupA.ScriptA, : !INC GroupA.ScriptB, etc
- add a switch case in RunLast script that will call the function matching the ref e.g. ScriptA -> call OnProjectBrowserScriptA
-> unfortunately this doesn't work either since all my scripts have an option explicit which generates an error

Thanks for your replies. The tagged values store the definition of DB Views generated by EA via a DB Reserve.
So the full query is generated without any restriction on the number of chars.

It works ok if I use the API Object method as an alternative to queries (will use that..).


In a VbScript, I set a local variable with the content from t_objectproperties.notes which I get by calling Repository.SQLQuery(SQL).
The script works well with a DBMS but not with an EAP: I figured out that the returned value is truncated after 255 chars.

Is this a known issue with EAP? Is there a workaround?


Here is a working solution in C#

1. create a Helper class:

Code: [Select]
using System.Runtime.InteropServices; //required for APIs
namespace myaddin....
    public static class WindowHelper
        public static void BringProcessToFront()
            Process proc = Process.GetCurrentProcess();
            IntPtr procHandle = proc.MainWindowHandle;
            if (IsIconic(procHandle))
                ShowWindow(procHandle, SW_RESTORE);

        const int SW_RESTORE = 9;

        private static extern bool SetForegroundWindow(IntPtr handle);
        private static extern bool ShowWindow(IntPtr handle, int nCmdShow);
        private static extern bool IsIconic(IntPtr handle);

2. when EA screen needs to be restored, call the following:

Code: [Select]

Suggestions and Requests / Find Attribute type in Project Browser
« on: May 02, 2018, 06:56:53 pm »
It would be nice to have a Find Type in Project Browser for class attributes from a diagram or project browser to select the matching type in the browser.

Hi Adrian,

Thanks for your reply. I tried what you suggested in C# (using some infos from and it's working :)
I need to consolidate it with all my forms, and should be able to provide a code sample if anyone comes across the same issue with C#.



To improve usability in a future release of my add-in, I sometimes close an add-in popup window (C# form) to open another one.
So I have a class that runs Close() and Dispose() on the initial form object before creating another form (typically I open form1 from EA, form1 opens settingsform, and when settingsform is closed, the add-in determines that form1 needs to be closed and replaced with form2).
It works well, except that EA main screen/window sometimes gets hidden behind another application e.g. my web browser.

I tried to run repository.ShowWindow(1); but it doesn't do anything (BTW EA help doesn't say what value needs to be provided in ShowWindow to display or hide... even though I assume it's 1 & 0).


Pages: [1] 2 3 ... 41