I am creating an Add-in for ArcMap 10.2 using C#.NET. Documentation for Python Add-ins says you can access the data located inside the installation location using the __file__ built-in function.
How do I access this location in .NET? I know the location is "C:\Users\<username>\AppData\Local\ESRI\Desktop10.0\AssemblyCache" but that isn't very helpful since I don't know the username.
Thanks,
Keith
Solved! Go to Solution.
If you embed the data in the project you can get the path to it in C# starting with System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location). this will give you the path to where the addin data is extracted on the machine within the AssemblyCache folder.
If you embed the data in the project you can get the path to it in C# starting with System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location). this will give you the path to where the addin data is extracted on the machine within the AssemblyCache folder.