Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Julian O 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.
-
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.
-
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 :-\
-
Well, you should at least get some reference number. Though the progress with those reports are very also in my personal experience.
q.
-
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
-
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.