Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: arizzi on April 15, 2021, 04:56:08 pm

Title: Interop.EA compatibility with the new versions of EA
Post by: arizzi on April 15, 2021, 04:56:08 pm
Hi All,

I developed an Add-In for Enterprise Architect using C#. I noticed that Sparx release a new build of Enterprise Architect every 2 months.

Should I update the Interop.EA.dll included in my project according to the new releases to keep the compatibility?

Does a version of EA exist long term support?
Title: Re: Interop.EA compatibility with the new versions of EA
Post by: Geert Bellekens on April 16, 2021, 01:27:13 am
Usually EA's new versions are backwards compatible, so I wouldn't worry too much.

When I develop add-ins I reference the Interop.EA from the program files folder of EA.
I don't keep a separate copy in my project folder.

Geert
Title: Re: Interop.EA compatibility with the new versions of EA
Post by: arizzi on May 27, 2021, 06:21:27 pm
Thank you for the information Geert

Angelo
Title: Re: Interop.EA compatibility with the new versions of EA
Post by: mateiacd on June 05, 2022, 05:10:11 pm
>>When I develop add-ins I reference the Interop.EA from the program files folder of EA.
>>I don't keep a separate copy in my project folder.


You mean you are not deploying Interop.EA.dll in your add-in folder ? (e.g. "C:\Program Files (x86)\MyCompany\MyEAAddinsFolder" ) ?
You mean you are relying on loading automatically C:\Program Files (x86)\Sparx Systems\EA\Interop.EA.dll ?
- add a reference to Interop.EA.dll in your C# add-in project and set "Copy Local" to False ?
- set "Embed Interop Type"  = True ?
https://sparxsystems.com/enterprise_architect_user_guide/15.2/automation/automation_connect_setup.html

But then, if Enterprise Architect is installed in another folder (say D:\Programs\Sparx Systems\EA)  how do you load Interop.EA.dll at runtime from a random Enterprise Architect installation folder?
Title: Re: Interop.EA compatibility with the new versions of EA
Post by: Geert Bellekens on June 05, 2022, 08:55:18 pm
But then, if Enterprise Architect is installed in another folder (say D:\Programs\Sparx Systems\EA)  how do you load Interop.EA.dll at runtime from the Enterprise Architect installation folder?
I'm not sure, never tried that before or had any complaints from clients having this issue.

Geert
Title: Re: Interop.EA compatibility with the new versions of EA
Post by: mateiacd on June 06, 2022, 06:19:30 am
How is possible that an add-on written in C#, installed together with the new Interop.EA.dll 360,320 bytes large that comes with Enterprise Architect 16, is still working perfectly well if deployed on previous Enterprise Architect 15 or 13 distributions?

I thought that Interop.EA.dll would work only with either .eap (JET) or with .qea (SQLite) file types, but it seems it doesn't care and works perfectly well with both file types.

The new Interop.EA.dll that comes with Enterprise Architect 16, appears to be very happy to work with both file types (JET or SQLite) as long as it receives an EA.Repository object in the EA_Connect event.
 public String EA_Connect(EA.Repository rep)
Title: Re: Interop.EA compatibility with the new versions of EA
Post by: Eve on June 06, 2022, 10:42:11 am
Interop.EA.dll is a wrapper around the API provided by EA.exe, and the windows registry is what specifies how EA.exe is found. This means that it has no impact on what file formats you can access.

Developing against an old interop and using it with a newer EA will not cause any problems.

Developing against a recent interop and then using an older EA may cause problems. Specifically, if you call a function that was added after the version you are actually running, the function doesn't exist and will probably crash.