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 ... 3 4 [5] 6 7 ... 44
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).


Having given it more thoughts and compared the "parents" tag + dependencies with the viewdef tag content, I may have identified a potential solution:
- parents tag lists all tables and views used by the view based on the FROM clause (incl. joins)
- dependencies match the tables and views involved in the SELECT clause i.e. at least one column appears in the view results/content

General Board / Reverse DB result: views dependencies & Parents tag
« on: April 27, 2018, 01:48:45 am »

I ran a DB Reverse on a SQL Server that has tables and views.
I'm interested in the link between views and the data sources i.e. tables ; I understand this is stored in the parents tagged value with a comma-separated list of table names.

I couldn't find in the user guide what the dependency links from Views to Tables mean. Anyone has an idea?
Ideally I'd like to have links from views to the table sources which I can get via a script.

General Board / Re: Excel Import
« on: April 26, 2018, 01:19:18 am »
Hi Takeshi,

That's a really nice EA hint! I shall remember it.



I can confirm that it works fine with the latest build.


Bugs and Issues / SQL Server Reverse on views: truncated definition
« on: April 20, 2018, 11:19:28 pm »

I got the result of an EA reverse engineering run on a SQL Server DB that contains views. When the view definition (query) is longer than 4000 characters, the resulting definition in EA (viewdef tag memo) is truncated at this position.
I found a post on this issue here:,10962.msg148710/topicseen.html#msg148710

Is there a way to resolve this in SQL Server, ODBC configuration or else?


Automation Interface, Add-Ins and Tools / Re: Scripts submenus
« on: April 20, 2018, 07:20:11 pm »
Hi Aaron,

The easiest solution would involve using the existing groups in EA.

If you create Diagram Package Groups Group1, Group2, etc. then having an option in EA to treat groups as sub menus would solve the issue
So a right click on a diagram or package would display...
   Script 1
   Script 2
   Script 3
   Script 4

Instead of having a flat list ...
Script 1
Script 2
Script 3
Script 4

This issue is impacting quite a lot of users who have many scripts now.

It would be useful to add to the "Insert Related Elements" Connector types and Element types, a filter on Stereotypes e.g. to select "ABC" stereotyped classes that are associated with the current element.
It would also make sense to include the Stereotype on the Field chooser.

Automation Interface, Add-Ins and Tools / Script editor improvements
« on: April 11, 2018, 05:53:22 pm »
EA scripting editor works nicely (I use VBScript), yet a few enhancements would be nice to reach other scripting tools.
- Provide a collapse/expand commands (+/-)  on functions and routines
- Drop down list of functions and routines (as it's done when opening source code)

Could this be added in a future EA build?

Hi Uffe,

Nice one. I look forward to testing it.

Bugs and Issues / Re: Python reverse - empty result
« on: April 09, 2018, 10:26:56 pm »
Thanks for your replies.
With support of the Python dev team, I simply figured out that the code samples I got needed to have a proper indent level applied so the def can be reversed as class operations.

I got a query on running the EA Execution analyzer's recording feature with Python. I saw that it's not supported according to the help; could it be supported in the future?

Pages: 1 ... 3 4 [5] 6 7 ... 44