Book a Demo

Author Topic: Unavailable method in JavaAPI and in C#  (Read 4371 times)

alexkidd

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Unavailable method in JavaAPI and in C#
« on: March 07, 2013, 10:12:59 pm »
Hello,

I'm currently working on a project where I have to find a way to export project EA to obtain an .EAP file (Project Transfer : DBMS to EAP).

I would like to do this in Java.

I find a solution with a method from the Project.class :

ProjectTransfer (string SourceFilePath, string TargetFilePath, string LogFilePath)

Unfortunately, the method is not available in the Java API. In examples I saw on the forum it was written in C#.

Why I can't use this method in Java?

Maybe someone have a solution to export DBMS to EAP in Java?

Thank you.

Bye
« Last Edit: March 08, 2013, 08:36:52 pm by alexkidd »

alexkidd

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Unavailable method in JavaAPI (available in C#
« Reply #1 on: March 08, 2013, 08:35:05 pm »
Well, I decided to move on a C# project to do the job.

I created the C# project and I have the assembly Interop.EA.dll in my project.

But I have the same problem :

System.MissingMethodException:'Boolean EA.IDualProject.ProjectTransfer(System.String, System.String, System.String)'.

I don't understand why I can't access to this method.

In this topic people seems to didn't have this problem (one month ago) :

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1359989135/3#3

Maybe I have to contact the support to have an answer?

Thank you for the help.

Bye

« Last Edit: March 08, 2013, 08:36:36 pm by alexkidd »

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Unavailable method in JavaAPI and in C#
« Reply #2 on: March 08, 2013, 10:44:46 pm »
Are you using an out of date version of InteropEA.dll?

Make sure your reference in your Visual Studio Solution Project is set to the [highlight]Interop.EA.dll in the Sparx Systems Enterprise Architect installation folder[/highlight] (for Windows 7 this will be Program Files (x86)/Sparx Systems/EA

If you have used the sample Add-In code from Sparx, there is a local copy of Interop.EA.dll in the folder structure which is very out-of-date!

Just update your reference as above and all should be OK
Models are great!
Correct models are even greater!

alexkidd

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Unavailable method in JavaAPI and in C#
« Reply #3 on: March 09, 2013, 01:53:14 am »
Hi,

Thanks for your reply.

I use the correct Interop.EA.dll located in the installation folder.

I don't understand how I can have the method available in the IDE but unavailable when I execute my program (System.MissingMethodException).

Bye

alexkidd

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Unavailable method in JavaAPI and in C#
« Reply #4 on: March 09, 2013, 02:36:18 am »
Ok I find the solution with the help of my teammates.

This is what I do :

1) Install SDK Microsoft .NET Framework 2.0
2) In C:\Program Files (x86)\Microsoft.NET\SDK\v2.0\Bin
 a) gacutil /i Interop.EA.dll
3) Can use the dll correctly in my C# project

Bye