Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started 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?
-
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
-
Thank you for the information Geert
Angelo
-
>>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?
-
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
-
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)
-
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.