<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get location of DLL from C# code. in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5972211#M75784</link>
    <description>&lt;P&gt;I am using application specific macro so I can use VS later.&amp;nbsp; This is only short term testing right now.&amp;nbsp; There are dll.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2016 17:30:48 GMT</pubDate>
    <dc:creator>jaboone</dc:creator>
    <dc:date>2016-01-04T17:30:48Z</dc:date>
    <item>
      <title>Get location of DLL from C# code.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5268135#M75779</link>
      <description>&lt;P&gt;I need to retrieve the directory where the plugin DLL resides. When I use the usual C# code for this,&amp;nbsp;&lt;EM&gt;Directory.GetCurrentDirectory(),&amp;nbsp;&lt;/EM&gt;I get the location of the RevIt installation on my machine, and not the directory where the running DLL is located. Is there a way, through the API, to retrieve the location of the running DLL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scott S&lt;/P&gt;&lt;P&gt;Research Programmer&lt;/P&gt;&lt;P&gt;Center for Research Computing&lt;/P&gt;&lt;P&gt;University of Notre Dame&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 14:44:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5268135#M75779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-11T14:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get location of DLL from C# code.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5268165#M75780</link>
      <description>&lt;P&gt;String executablePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;should do the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 14:54:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5268165#M75780</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-11T14:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get location of DLL from C# code.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5268177#M75781</link>
      <description>&lt;P&gt;Absolutely, that did it! Thanks so much!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 14:57:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5268177#M75781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-11T14:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get location of DLL from C# code.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5968574#M75782</link>
      <description>&lt;P&gt;I am using macro and getting an error on assembly not found. &amp;nbsp;Is there a solution for that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The name 'Assembly' does not exist in the current context (CS0103) - C:\ProgramData\Autodesk\Revit\Macros\2015\Revit\AppHookup\CConvert\Source\CConvert\ThisApplication.cs:55,62&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 18:17:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5968574#M75782</guid>
      <dc:creator>jaboone</dc:creator>
      <dc:date>2015-12-30T18:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get location of DLL from C# code.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5970812#M75783</link>
      <description>I'm guessing that macros (as opposed to addins) are code run within the document. As such there is no dll or assembly.</description>
      <pubDate>Sun, 03 Jan 2016 14:29:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5970812#M75783</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2016-01-03T14:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get location of DLL from C# code.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5972211#M75784</link>
      <description>&lt;P&gt;I am using application specific macro so I can use VS later.&amp;nbsp; This is only short term testing right now.&amp;nbsp; There are dll.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 17:30:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/5972211#M75784</guid>
      <dc:creator>jaboone</dc:creator>
      <dc:date>2016-01-04T17:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get location of DLL from C# code.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/7674882#M75785</link>
      <description>&lt;P&gt;The solution accepted here does not work for 2017. It returns the location of the .addin file, not the location of the executing dll which is in a .bundle sub-folder. I have only just picked up that my support help files are not being found, although were previously. Has there been a change for 2017? I have also tried various suggestions with no success. In fact they return the same.&lt;/P&gt;
&lt;PRE&gt;public static string GetDLLFolder()
        {
            string codeBase = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
            UriBuilder uri = new UriBuilder(codeBase);
            string path = Uri.UnescapeDataString(uri.Path);
            return Path.GetDirectoryName(path);
        }&lt;/PRE&gt;
&lt;P&gt;Thanks, Dale&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 12:28:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/get-location-of-dll-from-c-code/m-p/7674882#M75785</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2018-01-09T12:28:01Z</dc:date>
    </item>
  </channel>
</rss>

