Hello everyone,
It's my first post in here. I did a little search for this question but didn't found anything.
I'm developing a plugin for Autocad using C#. In the same folder of the plugin DLL, I have subfolder (let's call it "data") that contains a lot of files that my plugin will use. In order to make the program work indepedent of the location of the DLL file (and the subfolder), I need to get the directory of my plugin dll. Anyone knows how can I achieve this? If this was a regular C# Winforms application, I would use "Application.StartupPath", but that's not available when developing an Autocad plugin.
Thanks in advance,
Fergo.
Hi,
This slould work: System.Reflection.Assembly.GetExecutingAssembly.Location
Gaston Nunez
You might also want to try a more traditional route of using the registry, so that the data can be located on a personal network drive, common read-only network location, or similar place where a DLL might not be appropriate.