<?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: Launching AutoCad Issue in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3780056#M51180</link>
    <description>&lt;P&gt;Hi, Tony!&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;So&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;it is not only&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I see that&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Fenton&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;kidding?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Feb 2013 21:12:45 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2013-02-13T21:12:45Z</dc:date>
    <item>
      <title>Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3777821#M51162</link>
      <description>&lt;P&gt;I have another program that will launch this code below (admittedly, I got it from "Through the Interface")&lt;/P&gt;&lt;PRE&gt;Imports Autodesk.AutoCAD
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.ApplicationServices.Application
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
'Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Windows
Imports System
Imports Autodesk.AutoCAD.Interop
Imports System.Runtime.InteropServices
Imports Autodesk.AutoCAD.Internal.Forms
Imports System.Windows.Forms

Public Class launchAutoCad
    Public Shared Sub StartAutoCAD()
        ' "AutoCAD.Application.17" uses 2007, 2008, 2009
        '  whichever was most recently run
        ' "AutoCAD.Application.17.1" uses 2008, specifically
        ' "AutoCAD.Application.18" uses 2010, 2011, 2012
        ' "AutoCAD.Application.18.1" uses 2011, specifically
        ' "AutoCAD.Application.19" uses 2013,...

        Const progID As String = "AutoCAD.Application.18"
        Dim acApp As AcadApplication = Nothing

        Try
            acApp = DirectCast(Marshal.GetActiveObject(progID), AcadApplication)
        Catch ex2 As Exception
            Try
                Dim acType As Type = Type.GetTypeFromProgID(progID)
                acApp = DirectCast(Activator.CreateInstance(acType, True), AcadApplication)

            Catch ex As Exception
                MessageBox.Show("Cannot create object of type """ &amp;amp; progID &amp;amp; """")
            End Try
        End Try
        acApp = DirectCast(Marshal.GetActiveObject(progID), AcadApplication)

        If acApp IsNot Nothing Then
            ' By the time this is reached AutoCAD is fully
            ' functional and can be interacted with through code
            acApp.Visible = True
            acApp.ActiveDocument.SendCommand("(command " &amp;amp; Chr(34) &amp;amp; "NETLOAD" &amp;amp; Chr(34) &amp;amp; " " &amp;amp; _ Chr(34) &amp;amp; "C:\\mystuff\\myprog.dll" &amp;amp; Chr(34) &amp;amp; ") ")
        End If
    End Sub
End Class&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the first "Try" it will throw an exception because AutoCad is not running.&lt;/P&gt;&lt;P&gt;In the second "Try" we have:&lt;/P&gt;&lt;P&gt;acApp = DirectCast(Activator.CreateInstance(acType, True), AcadApplication)&lt;/P&gt;&lt;P&gt;Which launched AutoCad (it shows up in the task manager).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But still, it then goes into the next "Catch" and the message box says is can't create that ype of object.&amp;nbsp; But I can see that it launched AutoCad.&lt;/P&gt;&lt;P&gt;So I copied the line:&lt;/P&gt;&lt;P&gt;acApp = DirectCast(Marshal.GetActiveObject(progID), AcadApplication)&lt;/P&gt;&lt;P&gt;and forced it.&amp;nbsp; It worked.&lt;/P&gt;&lt;P&gt;Why would it throw an error if it did what it was supposed to do?&amp;nbsp; I see so many people using this same code on many different forums, but I can't understand why it doesn't work for me.&lt;/P&gt;&lt;P&gt;Thanks, in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2013 23:03:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3777821#M51162</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-11T23:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3777879#M51163</link>
      <description>&lt;P&gt;It's really difficult to say what the problem might be. Usually, when you have issues with COM not working as expected it's because the installation is corrupted somehow...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what I would advise...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Uninstall all Autodesk products&lt;/P&gt;
&lt;P&gt;2) reinstall in chronological order.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 01:19:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3777879#M51163</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2013-02-12T01:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3777982#M51164</link>
      <description>&lt;P&gt;Try this solution: &lt;A href="http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S.: Are you trying to use AutoCAD .NET API from external exe-file? It is impossible.&lt;/P&gt;
&lt;P&gt;E.g. those namespaces can be using &lt;U&gt;only&lt;/U&gt; from&amp;nbsp; dll-file netloading into AutoCAD:&lt;/P&gt;
&lt;PRE&gt;Imports Autodesk.AutoCAD
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.ApplicationServices.Application
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Windows&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 07:17:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3777982#M51164</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-02-12T07:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778571#M51165</link>
      <description>&lt;P&gt;"those namespaces can be using &lt;U&gt;only&lt;/U&gt; from&amp;nbsp; dll-file netloading into AutoCAD"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not necessarily - you can import .NET DLLs that are dependent on another EXE as a reference to its types only (the dependencies will be ignored). This is particularly useful when using reflection.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 18:12:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778571#M51165</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2013-02-12T18:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778589#M51166</link>
      <description>&lt;P&gt;I've gotten around the thrown exception by changing the code as shown:&lt;/P&gt;&lt;PRE&gt;Public Class launchAutoCad
    Public Shared Sub StartAutoCAD(ByVal rad As String)
        ' "AutoCAD.Application.17" uses 2007, 2008, 2009
        '  whichever was most recently run
        ' "AutoCAD.Application.17.1" uses 2008, specifically
        ' "AutoCAD.Application.18" uses 2010, 2011, 2012
        ' "AutoCAD.Application.18.1" uses 2011, specifically
        ' "AutoCAD.Application.19" uses 2013,...

        Const progID As String = "AutoCAD.Application.18"
        Dim acApp As AcadApplication = Nothing

        Try
            ' Get a running instance of AutoCad
            acApp = DirectCast(Marshal.GetActiveObject(progID), AcadApplication)
        Catch 'ex As Exception
            Try
                Dim acType As Type = Type.GetTypeFromProgID(progID)
                acApp = DirectCast(Activator.CreateInstance(acType, True), AcadApplication)

            Catch 'ex2 As Exception
                If IsProcessRunning("acad") = False Then
                    MessageBox.Show("Cannot create object of type """ &amp;amp; progID &amp;amp; """")
                Else
                    acApp = DirectCast(Marshal.GetActiveObject(progID), AcadApplication)
                End If
            End Try
        End Try

        If acApp IsNot Nothing Then
            ' By the time this is reached AutoCAD is fully
            ' functional and can be interacted with through code
            acApp.Visible = True
            'acApp.ActiveDocument.SendCommand("(command " &amp;amp; Chr(34) &amp;amp; "NETLOAD" &amp;amp; Chr(34) &amp;amp; " " &amp;amp; _
            '                    Chr(34) &amp;amp; "C:\\mystuff\\myprog.dll" &amp;amp; Chr(34) &amp;amp; ") ")


            Dim AcadDocs As Object = acApp.GetType().InvokeMember("Documents", Reflection.BindingFlags.GetProperty, Nothing, acApp, Nothing)
            ' Create array of parameters  
            Dim filename As String = "temp.dwg"
            Dim args() As Object = New Object(1) {}

            args(0) = filename
            args(1) = False 'read-only=false  

            ' open a drawing  
            Dim AcDoc As Object = AcadDocs.GetType.InvokeMember("Open", Reflection.BindingFlags.InvokeMethod, Nothing, AcadDocs, args, Nothing)
            Dim Util As Object = New Object

            ' Get reference on active document  
            AcDoc = acApp.GetType.InvokeMember("ActiveDocument", Reflection.BindingFlags.GetProperty, Nothing, acApp, Nothing, Nothing)

            ' Get reference of  AcadUtility  
            Util = AcDoc.GetType().InvokeMember("Utility", Reflection.BindingFlags.GetProperty, Nothing, AcDoc, Nothing)

            ' Get reference on ModelSpace  
            Dim oSpace As Object = AcDoc.GetType.InvokeMember("ModelSpace", Reflection.BindingFlags.GetProperty, Nothing, AcDoc, Nothing)

            ''********************************* draw circle ************************** 
            Dim center As Point3d = New Geometry.Point3d(0, 0, 0)
            Dim radius As Double
            radius = (CDbl(Val(rad)))
            DrawCircle(center, radius)

        End If
    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have a function defined (IsProcessRunning) that works for this.&amp;nbsp; It actually checks to see if the process "acad.exe" is actually running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am launching the dll from an exe currently (for testing) eventually it will be a web app.&lt;/P&gt;&lt;P&gt;I do have another issue though, I was just trying to pass the dll a string (just to see if I could)&lt;/P&gt;&lt;P&gt;Public Shared Sub St&lt;FONT size="2" face="Consolas"&gt;artAutoCAD(ByVal rad As String)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the calling .exe:&lt;/P&gt;&lt;PRE&gt;Module Module1
    Sub Main()
        Dim rad As String = "12.5"
        launchAutoCad.launchAutoCad.StartAutoCAD(rad)
    End Sub
End Module&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I get the following error:&lt;/P&gt;&lt;P&gt;Could not load file or assembly 'acdbmgd, Version=18.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help clearing that one up would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 18:28:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778589#M51166</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-12T18:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778645#M51167</link>
      <description>&lt;P&gt;By the way, to refect the types without resolving the dependencies... Do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="imcontent"&gt;&lt;SPAN style="margin: 0px; color: #000000; font-family: Lucida Grande; font-size: 12pt; -ms-word-wrap: break-word;"&gt;Assembly.ReflectionOnlyLoadFrom()&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Feb 2013 19:14:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778645#M51167</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2013-02-12T19:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778777#M51168</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/400685"&gt;@fenton_webb&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;"those namespaces can be using &lt;U&gt;only&lt;/U&gt; from&amp;nbsp; dll-file netloading into AutoCAD"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not necessarily - you can import .NET DLLs that are dependent on another EXE as a reference to its types only (the dependencies will be ignored). This is particularly useful when using reflection.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi, Fenton!&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;Are you saying&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;that I can&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;use the classes&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;/ methods&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;acdbmgd.dll, acmgd.dll, accoremgd.dll from external exe-file???&lt;/SPAN&gt;&lt;/SPAN&gt; You're&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;kidding me? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;Otherwise I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;do not&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;see any reason to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;load these&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;assemblies in the&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;exe-&lt;/SPAN&gt;&lt;SPAN&gt;file&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if I can not&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;use the&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;dll-&lt;/SPAN&gt;&lt;SPAN&gt;files (ie&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to &lt;U&gt;execute code from&lt;/U&gt;&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;&lt;U&gt;them&lt;/U&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 20:17:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778777#M51168</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-02-12T20:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778784#M51169</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;... I get the following error:&lt;/P&gt;
&lt;P&gt;Could not load file or assembly 'acdbmgd, Version=18.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help clearing that one up would be greatly appreciated.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;That's because&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;you're trying to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;use the classes&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;/ methods&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;from&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;acmgd.dll&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;from external&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;exe-&lt;/SPAN&gt;&lt;SPAN&gt;file instead&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;from&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;dll-&lt;/SPAN&gt;&lt;SPAN&gt;file loaded into&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;AutoCAD. Point3d is a class defined in acdbmgd.dll&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 20:21:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778784#M51169</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-02-12T20:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778861#M51170</link>
      <description>&lt;P&gt;Hi Alexander, can you tell me how to resolve this?&amp;nbsp; I have been writing VB.Net code, but always ran the code in an existing AutoCad session, never like this.&amp;nbsp; This is all new to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 20:44:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778861#M51170</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-12T20:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778866#M51171</link>
      <description>&lt;P&gt;Hello Fenton,&lt;/P&gt;&lt;P&gt;You wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, to refect the types without resolving the dependencies... Do this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="margin: 0px; color: #000000; font-family: Lucida Grande; font-size: 12pt; word-wrap: break-word;"&gt;Assembly.ReflectionOnlyLoadFrom()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is going to sound stupid, but, what do I do with that?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 20:48:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778866#M51171</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-12T20:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778969#M51172</link>
      <description>&lt;P&gt;I'm not kidding, Alexander!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 22:34:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778969#M51172</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2013-02-12T22:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778989#M51173</link>
      <description>&lt;P&gt;I do not have a reference to the &lt;SPAN&gt;acmgd.dll&lt;/SPAN&gt; file in the .exe "References".&amp;nbsp; I do have a reference to the launchAutoCad.dll though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;After all, I'm just sending a string, not attempting to launch any AutoCad commands.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 23:01:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778989#M51173</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-12T23:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778993#M51174</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;Hi, Fenton!&lt;BR /&gt;Then&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;please&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;explain&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;what you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;mean.&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Preferably with&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;an new example&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;on&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;&lt;A href="http://adndevblog.typepad.com/autocad/" target="_blank"&gt;http://adndevblog.typepad.com/autocad/&lt;/A&gt;&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;and&lt;/SPAN&gt; with &lt;SPAN class="hps"&gt;title:&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;"How to use&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;AutoCAD .NET API&lt;/SPAN&gt; assemblies &lt;SPAN class="hps"&gt;out of acad.exe process"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 23:03:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778993#M51174</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-02-12T23:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778997#M51175</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/70249"&gt;@mgorecki&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I do not have a reference to the &lt;SPAN&gt;acmgd.dll&lt;/SPAN&gt; file in the .exe "References".&amp;nbsp; I do have a reference to the launchAutoCad.dll though.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And launchAutoCad.dll has reference to acdbmgd.dll and/or acmgd.dll? If so - than it is identical that .exe has reference to those. &lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2013 23:07:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3778997#M51175</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-02-12T23:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779455#M51176</link>
      <description>&lt;P&gt;Ok, I give.&amp;nbsp; I removed the reference to launchAutoCad from the references and now the line:&lt;/P&gt;&lt;P&gt;launchAutoCad.launchAutoCad.StartAutoCAD(rad) says "launchAutoCad is not declared...."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked all over, Googling everything I can think of that would relate.&amp;nbsp; I'm not asking for you to write the code, but can you please point me in the right direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked at declare and DllImport, but either I don't understand, or it just doesn't apply.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 15:33:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779455#M51176</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-13T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779852#M51177</link>
      <description>&lt;P&gt;Hi Fenton.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I'm not mistaken, there is static initialization occuring in AutoCAD's managed assemblies or native DLLs they link to, and that would mean that code executes at the point when the assembly or one of its dependents is loaded, and would prevent it from being loaded into any process, whcih would be triggered by any attmept to reflect on any contained types. &amp;nbsp;You can use ReflectionOnlyLoadFrom() to load a DLL as a data file, which allows you to access its metadata, but that's not the same as referencing the assembly in an .exe project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i'm mistaken, then I'd like to see an example of this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 19:27:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779852#M51177</guid>
      <dc:creator>DiningPhilosopher</dc:creator>
      <dc:date>2013-02-13T19:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779953#M51178</link>
      <description>&lt;P&gt;Hello, can you help me out?&amp;nbsp; I have an exe that&amp;nbsp;is supposed to&amp;nbsp;launch a dll and pass the dll an argument (in this case an array).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At first I was just trying to get the exe to run the dll which launches AutoCad.&amp;nbsp; Now that it works, I want it to send an array of strings to the dll so that after AutoCad launches it can execute the program and create my drawing (using the info from the array).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the .exe.&amp;nbsp; I've doinked around with it a bunch and this is it's present condition:&lt;/P&gt;&lt;PRE&gt;Imports System.Runtime.InteropServices

Module Module1
    Declare Sub test Lib "C:\_svn\launchAutoCad\bin\Debug\launchAutoCad.dll" Alias "StartAutoCAD" (ByVal rad As String)

    Sub Main()
        Dim rad As String = "12.5"
        test(rad)
        'launchAutoCad.launchAutoCad.StartAutoCAD(rad)
    End Sub
End Module&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;It used to just be the commented out line, but when I wanted to pass an array, it choked on a reference to an AutoCad dll (one of the reference dlls that get loaded into the program in References).&amp;nbsp; Since the exe didn't have any of those references, it was choking because it did have a reference to my program .dll that did have them.&lt;/P&gt;&lt;P&gt;I removed the reference to my program dll from References in the exe, but am now facing more errors that are over my head.&lt;/P&gt;&lt;P&gt;My dll looks like this:&lt;/P&gt;&lt;P&gt;Public Class launchAutoCad&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Shared Sub StartAutoCAD(ByVal rad As String)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written a number of programs in VB.net for AutoCad, but always ran them after loading in an existing AutoCad session.&amp;nbsp; My company wants to go another route, so I need to be able to do this.&amp;nbsp; There are no help docs out there that specifically discusss this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me out?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 20:24:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779953#M51178</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-13T20:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779958#M51179</link>
      <description>&lt;P&gt;I know it says it's passing a string, but I will eventually want to pass an array.&amp;nbsp; I was just using "string" as it was quick and easy.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 20:25:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3779958#M51179</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-13T20:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3780056#M51180</link>
      <description>&lt;P&gt;Hi, Tony!&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;So&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;it is not only&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I see that&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Fenton&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;kidding?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 21:12:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3780056#M51180</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-02-13T21:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Launching AutoCad Issue</title>
      <link>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3780058#M51181</link>
      <description>&lt;P&gt;Hello?&amp;nbsp; Pointers?&amp;nbsp; What should I do??&amp;nbsp; Anything??&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2013 21:15:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/launching-autocad-issue/m-p/3780058#M51181</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2013-02-13T21:15:53Z</dc:date>
    </item>
  </channel>
</rss>

