Author Topic: ImportFile C# Add-in API GetLastError  (Read 5640 times)

Julian O

  • EA Novice
  • *
  • Posts: 10
  • Karma: +1/-0
    • View Profile
ImportFile C# Add-in API GetLastError
« on: June 07, 2016, 12:39:32 am »
I am currently on an C# Add-in to import source files (C++) into Enterprise Architect. And my goal is to automate this process as much as possible.

So in order to achieve this I'm calling 'ImportDirectory(...)"-Function on 'Repository.GetProjectInterface();'. When I do this it all imports as expected and if macros are found in code it throws parsing errors. All good.

Now I have to use the 'ImportFile(...)'-Function on the same ProjectInterface, because i need to create some packages first and then import this files into separate packages. And this almost works. The only problem now is if I try to import source code with unknown macros, I expect to get parsing errors or at least retrieve the information somehow. Unfortunately the Import-Function for files does not automatically show a Dialog if an error was found (it only returns false). I tried to get the error message with the 'Repository.GetProjectInterface().GetLastError();'. This does return an empty string.

Is there a way to get the same information about the parsing error as 'ImportDirectory' shows in the dialog?

Really appreciate your help and if you need more information please tell me and I will add missing parts.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: ImportFile C# Add-in API GetLastError
« Reply #1 on: June 07, 2016, 01:18:39 am »
I'm afraid you will not be able to get that information. EA is very minimalistic when it comes to error recovery. You might send a bug report or a feature request (both bottom right of this page).

q.

Julian O

  • EA Novice
  • *
  • Posts: 10
  • Karma: +1/-0
    • View Profile
Re: ImportFile C# Add-in API GetLastError
« Reply #2 on: June 07, 2016, 01:29:50 am »
Thank you for your fast reply.

I will do so. Unfortunately I don't think much will happen with a bug report. I already sent some bug reports over the last year, never even got a response  :-\

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: ImportFile C# Add-in API GetLastError
« Reply #3 on: June 07, 2016, 06:08:35 am »
Well, you should at least get some reference number. Though the progress with those reports are very also in my personal experience.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13400
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: ImportFile C# Add-in API GetLastError
« Reply #4 on: June 07, 2016, 04:44:20 pm »
Thank you for your fast reply.

I will do so. Unfortunately I don't think much will happen with a bug report. I already sent some bug reports over the last year, never even got a response  :-\

You might want to check your spam folder as well. I've seen some reports here from people complaining that they never got any emails from Sparx, and a Sparxian confirming that they actually had send out several email to the person in question.

Geert

Julian O

  • EA Novice
  • *
  • Posts: 10
  • Karma: +1/-0
    • View Profile
Re: ImportFile C# Add-in API GetLastError
« Reply #5 on: June 08, 2016, 06:29:13 pm »
I don't know if it just was a coincidence or the magic of the forum, but I just heard back regarding one of my Bug-reports :)

// edit: And with this I mean that I got the reference number at least.
« Last Edit: June 08, 2016, 09:40:45 pm by Julian O »