<?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: Collection of loaded .Net applications in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3601590#M53569</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get the loaded .NET assemblies with the code below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;DIV style="font-family: Courier New; font-size: 8pt; color: black; background: white;"&gt;
&lt;P style="margin: 0px;"&gt;[&lt;SPAN style="color: #2b91af;"&gt;CommandMethod&lt;/SPAN&gt;(&lt;SPAN style="color: #a31515;"&gt;"ListLoadedApplication"&lt;/SPAN&gt;)]&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: blue;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;void&lt;/SPAN&gt; CmdListLoadedAssemblies()&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;{&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2b91af;"&gt;Document&lt;/SPAN&gt; doc = &lt;SPAN style="color: #2b91af;"&gt;Application&lt;/SPAN&gt;.DocumentManager.MdiActiveDocument;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2b91af;"&gt;Editor&lt;/SPAN&gt; ed = doc.Editor;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;//get all loaded assemblies in the current appdomain&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; System.Reflection.&lt;SPAN style="color: #2b91af;"&gt;Assembly&lt;/SPAN&gt;[] assemblies = System.&lt;SPAN style="color: #2b91af;"&gt;AppDomain&lt;/SPAN&gt;.CurrentDomain.GetAssemblies();&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;foreach&lt;/SPAN&gt; (System.Reflection.&lt;SPAN style="color: #2b91af;"&gt;Assembly&lt;/SPAN&gt; assembly &lt;SPAN style="color: blue;"&gt;in&lt;/SPAN&gt; assemblies)&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;//let's remove built-in .NET assemblies&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt; (!assembly.Location.ToLower().Contains(&lt;SPAN style="color: #a31515;"&gt;"windows"&lt;/SPAN&gt;))&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ed.WriteMessage(assembly.Location + &lt;SPAN style="color: #a31515;"&gt;"\n"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;}&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2012 14:41:33 GMT</pubDate>
    <dc:creator>augusto.goncalves</dc:creator>
    <dc:date>2012-08-30T14:41:33Z</dc:date>
    <item>
      <title>Collection of loaded .Net applications</title>
      <link>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3598532#M53567</link>
      <description>&lt;P&gt;Is there a collection object where I can iterate through loaded .net applications? Also, is there a programatic way to load .net apps from within another application? I would Like to use the registry to auto-load an initial app that then manages and loads other .net toolsets.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2012 16:21:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3598532#M53567</guid>
      <dc:creator>MRiemenCAD</dc:creator>
      <dc:date>2012-08-28T16:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of loaded .Net applications</title>
      <link>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3598766#M53568</link>
      <description>&lt;P&gt;You can load .NET DLL into AutoCAD with Syste,ReflectionAssembly.Load()/LoadFrom(). It does the same thing just as you load them by NETLOAD command in AutoCAD.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2012 19:08:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3598766#M53568</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2012-08-28T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of loaded .Net applications</title>
      <link>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3601590#M53569</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get the loaded .NET assemblies with the code below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;DIV style="font-family: Courier New; font-size: 8pt; color: black; background: white;"&gt;
&lt;P style="margin: 0px;"&gt;[&lt;SPAN style="color: #2b91af;"&gt;CommandMethod&lt;/SPAN&gt;(&lt;SPAN style="color: #a31515;"&gt;"ListLoadedApplication"&lt;/SPAN&gt;)]&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&lt;SPAN style="color: blue;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;void&lt;/SPAN&gt; CmdListLoadedAssemblies()&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;{&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2b91af;"&gt;Document&lt;/SPAN&gt; doc = &lt;SPAN style="color: #2b91af;"&gt;Application&lt;/SPAN&gt;.DocumentManager.MdiActiveDocument;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2b91af;"&gt;Editor&lt;/SPAN&gt; ed = doc.Editor;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;//get all loaded assemblies in the current appdomain&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; System.Reflection.&lt;SPAN style="color: #2b91af;"&gt;Assembly&lt;/SPAN&gt;[] assemblies = System.&lt;SPAN style="color: #2b91af;"&gt;AppDomain&lt;/SPAN&gt;.CurrentDomain.GetAssemblies();&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;foreach&lt;/SPAN&gt; (System.Reflection.&lt;SPAN style="color: #2b91af;"&gt;Assembly&lt;/SPAN&gt; assembly &lt;SPAN style="color: blue;"&gt;in&lt;/SPAN&gt; assemblies)&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="color: green;"&gt;//let's remove built-in .NET assemblies&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN style="color: blue;"&gt;if&lt;/SPAN&gt; (!assembly.Location.ToLower().Contains(&lt;SPAN style="color: #a31515;"&gt;"windows"&lt;/SPAN&gt;))&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ed.WriteMessage(assembly.Location + &lt;SPAN style="color: #a31515;"&gt;"\n"&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="margin: 0px;"&gt;}&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2012 14:41:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3601590#M53569</guid>
      <dc:creator>augusto.goncalves</dc:creator>
      <dc:date>2012-08-30T14:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of loaded .Net applications</title>
      <link>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3601600#M53570</link>
      <description>&lt;P&gt;Thanks for posting. I appreciate your help.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2012 14:43:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/collection-of-loaded-net-applications/m-p/3601600#M53570</guid>
      <dc:creator>MRiemenCAD</dc:creator>
      <dc:date>2012-08-30T14:43:48Z</dc:date>
    </item>
  </channel>
</rss>

