Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ankur on April 24, 2019, 10:56:59 pm
-
Hello,
I would like to get the complete directory path in EA Add-in along with the filename for the current .eapx file that I have opened.
I have tried the following in C# code for the Add-in:
Console.WriteLine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
Console.WriteLine(System.AppDomain.CurrentDomain.BaseDirectory);
Console.WriteLine(System.Environment.CurrentDirectory);
Console.WriteLine(System.IO.Directory.GetCurrentDirectory());
Console.WriteLine(Environment.CurrentDirectory);
But all of them return me the path of EA.exe and not my abc.eapx file.
Can anyone guide me in this regard.
Thanks in advance.
Regards,
Ankur
-
Hi Ankur,
Try Repository.ConnectionString
-
Hi Ankur,
Try Repository.ConnectionString
It worked. Thanks Guillaume :)