Author Topic: Interop.EA compatibility with the new versions of EA  (Read 2606 times)

arizzi

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Interop.EA compatibility with the new versions of EA
« 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12258
  • Karma: +484/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Interop.EA compatibility with the new versions of EA
« Reply #1 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

arizzi

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Interop.EA compatibility with the new versions of EA
« Reply #2 on: May 27, 2021, 06:21:27 pm »
Thank you for the information Geert

Angelo

mateiacd

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Interop.EA compatibility with the new versions of EA
« Reply #3 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?
« Last Edit: June 05, 2022, 11:06:25 pm by mateiacd »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12258
  • Karma: +484/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Interop.EA compatibility with the new versions of EA
« Reply #4 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

mateiacd

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Interop.EA compatibility with the new versions of EA
« Reply #5 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)
« Last Edit: June 06, 2022, 06:41:20 am by mateiacd »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7829
  • Karma: +107/-20
    • View Profile
Re: Interop.EA compatibility with the new versions of EA
« Reply #6 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.
« Last Edit: June 06, 2022, 03:00:11 pm by Eve »
Eve

support@sparxsystems.com