<?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: Question: Using AutoCAD 2012 through an external EXE in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380979#M56759</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I want to provide some information about my system that my be useful.&lt;/P&gt;&lt;P&gt;I'm Running:&lt;/P&gt;&lt;P&gt;Windows 7 Home Premium (64-bit edition)&lt;/P&gt;&lt;P&gt;Microsoft Visual Studio 2010 Ultimate&lt;/P&gt;&lt;P&gt;AutoCAD 2012 Structural Detailing (64-bit version)&lt;/P&gt;&lt;P&gt;and I have AutoCAD VBA Enabler installed too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can these information help?&lt;/P&gt;</description>
    <pubDate>Thu, 22 Mar 2012 09:01:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-22T09:01:18Z</dc:date>
    <item>
      <title>Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375475#M56743</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm working on a vb.net 2010 project and want to export a dwg file&amp;nbsp;So I'm trying to run AutoCAD, insert drawings and finally save the dwg file at some location.&lt;/P&gt;&lt;P&gt;I found this &lt;A href="http://forums.autodesk.com/t5/NET/how-to-access-AutoCAD-2012-from-Vb-net-Standard-Exe/td-p/3363237" target="_blank"&gt;page &lt;/A&gt;talking about this subject and it helped me to run autoCAD in the background and insert some drawings but when I try to save the file nothing happens, no file is saved anywhere and I can't make AutoCAD window appear.&lt;/P&gt;&lt;P&gt;Can anyone help me or is there an official tutorial about this or some website that talks about it clearly?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 18 Mar 2012 14:42:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375475#M56743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-18T14:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375523#M56744</link>
      <description>&lt;P&gt;If you can't see the Application running when you start then it is because you did not tell it to be visible. The following is a sample of opening AutoCAD and saving the document.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub StartApplication()&lt;BR /&gt;Dim AcApp As AcadApplication = Nothing&lt;BR /&gt;Dim AcAppName As String = "AutoCAD.Application.18"&lt;BR /&gt;Dim AcAppWasStarted As Boolean = False&lt;BR /&gt;Try&lt;BR /&gt;' we will connect to a running instance of AutoCAD is we have one.&lt;BR /&gt;AcApp = System.Runtime.InteropServices.Marshal.GetActiveObject(AcAppName)&lt;BR /&gt;Catch ex As Exception&lt;/P&gt;&lt;P&gt;End Try&lt;BR /&gt;If AcApp Is Nothing Then 'if it was not running then lets start the application.&lt;BR /&gt;AcApp = CreateObject(AcAppName)&lt;BR /&gt;AcApp.Visible = True 'true is we want to see the application running&lt;/P&gt;&lt;P&gt;End If&lt;BR /&gt;'Dim acDoc As AcadDocument = AcApp.ActiveDocument ' we will just get the active document&lt;BR /&gt;' if we wanted to open a document then it would be like this&lt;BR /&gt;If My.Computer.FileSystem.FileExists("c:\someDocument.dwg") Then&lt;BR /&gt;Dim acDoc As AcadDocument = AcApp.Documents.Open("c:\someDocument.dwg", False)&lt;BR /&gt;'we will do what we want with this document&lt;BR /&gt;acDoc.SaveAs("C:\savedDocument.dwg")&lt;BR /&gt;If AcAppWasStarted Then ' if the application started AutoCAD then lets let the application close it.&lt;BR /&gt;acDoc.Close()&lt;BR /&gt;AcApp.Quit()&lt;BR /&gt;End If&lt;BR /&gt;End If&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this does not solve your problem then please p&lt;SPAN&gt;ost&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;your&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;code&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;on&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;how&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;you&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;are&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;trying&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;save&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;the&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;drawing&lt;/SPAN&gt;&lt;SPAN&gt;..&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Mar 2012 16:54:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375523#M56744</guid>
      <dc:creator>Mike.Wohletz</dc:creator>
      <dc:date>2012-03-18T16:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375535#M56745</link>
      <description>&lt;P&gt;Thank you very much Mike.Wohletz, That solved my problem, I feel I can't thank you enough.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Mar 2012 17:14:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375535#M56745</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-18T17:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375571#M56746</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;so I'm facing another problem, mostly when I run the code you wrote, it works, but sometimes a message box appears and it says "Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))"&lt;/P&gt;&lt;P&gt;why does it appear randomly and what should I do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Mar 2012 20:30:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375571#M56746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-18T20:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375627#M56747</link>
      <description>&lt;P&gt;That one can be tough to pinpoint without seeing what is going on, try adding this to the end of the code that I had posted and see if that fixes the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;       'before we close we need to do some cleanup
        If Not AcApp Is Nothing Then
            System.Runtime.InteropServices.Marshal.ReleaseComObject(AcApp)
            GC.Collect()
            GC.WaitForPendingFinalizers()
        End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Mar 2012 22:55:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375627#M56747</guid>
      <dc:creator>Mike.Wohletz</dc:creator>
      <dc:date>2012-03-18T22:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375769#M56748</link>
      <description>&lt;P&gt;Actually the problem still exists, but here is I tried to do: I commented the&amp;nbsp;acDoc.Close()&lt;SPAN style="line-height: 14px;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;AcApp.Quit() out, then I opened AutoCAD manually and then ran my program, and it worked perfectly so is it possible that sometimes AutoCAD is not running properly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2012 06:12:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3375769#M56748</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-19T06:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3377317#M56749</link>
      <description>&lt;P&gt;This is a problem that appeared after AutoCAD 2010 Update 1.&amp;nbsp; The problem, and the solution, is explained in this Through the Interface &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="_self"&gt;POST&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to implement a reasonably simple iMessageFilter to retry the COM call if it is rejected.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2012 02:29:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3377317#M56749</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2012-03-20T02:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3378657#M56750</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I read your linked article and to be honest I don't know anything about C#, I tried to convert the code to vb.net using some website, but this produces errors that I don't know how to handle.&lt;/P&gt;&lt;P&gt;But I found a solution based on a theory that came up with, the theory says that AutoCAD is not ready to recieve commands whan I am trying to draw on it, so I need to wait for to get ready, but since I don't know how long should I wait, I assumed that 4 seconds is enough, so I insert this line:&lt;/P&gt;&lt;P&gt;System.Threading.Thread.Sleep(4000)&lt;/P&gt;&lt;P&gt;right before the code responsible for drawing and actually it worked like a miracle.&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;chiefbraincloud and&amp;nbsp;Mike.Wohletz for your help, I really appreciate it.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2012 20:16:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3378657#M56750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-20T20:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3378721#M56751</link>
      <description>&lt;P&gt;While it may seem to have solved your problem, waiting 4 seconds will NOT gaurauntee success every time, and it is possible to have a COM call rejected at other times besides when starting the program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have clipped out a VB version of the important code from the TTIF post and attached it here as a .txt file.&amp;nbsp; See if you can follow the couple of comments I put in, and merge this code into your form code (or vice/versa).&amp;nbsp; This code worked for me in the only COM code I have which is an installer that opens AutoCAD to create a&amp;nbsp;new profile and workspace using the current ones as&amp;nbsp;a starting point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2012 20:41:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3378721#M56751</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2012-03-20T20:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3379589#M56752</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;So I removed the sleep command and inserted your code and an exception occures at line (Dim doc As AcadDocument = acApp.ActiveDocument) and it says:&lt;/P&gt;&lt;P&gt;The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A(RPC_E_SERVERCALL_RETRYLATER))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the problem now?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 13:46:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3379589#M56752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-21T13:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3379613#M56753</link>
      <description>&lt;P&gt;Just curious if this is currently the only version of AutoCAD installed on this machine? If so has it ever had any other version installed on it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 14:00:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3379613#M56753</guid>
      <dc:creator>Mike.Wohletz</dc:creator>
      <dc:date>2012-03-21T14:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3379651#M56754</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;No, this the only version that I have ever installed on this machine.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 14:14:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3379651#M56754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-21T14:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380473#M56755</link>
      <description>&lt;P&gt;I'm not sure.&amp;nbsp; Is it&amp;nbsp;possible that the invisible AutoCAD session is trying to get user input, like asking the user to select the template file for the new drawing or something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible for you to attach the smallest version of your code that still has the error so that I can try it here?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 20:13:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380473#M56755</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2012-03-21T20:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380519#M56756</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Actually I don't think it does, anyway I attached the code you asked for, the exception occures at line 63.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 20:40:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380519#M56756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-21T20:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380577#M56757</link>
      <description>&lt;P&gt;It is working every time for me, the only thing that I did see that I would change is cleaning up after accessing the Acad Object. I added this to the end of what you have.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  Finally
                Try
                    acApp.Application.Quit()
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(acApp)
                    GC.Collect()
                    GC.WaitForPendingFinalizers()
                Catch ex2 As Exception
                    MsgBox(ex2.Message)
                End Try&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Please note that if this was going to run several times a minute I would not call the garbage collector on it every time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2012 21:26:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380577#M56757</guid>
      <dc:creator>Mike.Wohletz</dc:creator>
      <dc:date>2012-03-21T21:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380875#M56758</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I don't know what to do. although the sleep function somehow solved this problem too, but I am convinced that this solution is not the best way handle this problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for your support.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 06:09:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380875#M56758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-22T06:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380979#M56759</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I want to provide some information about my system that my be useful.&lt;/P&gt;&lt;P&gt;I'm Running:&lt;/P&gt;&lt;P&gt;Windows 7 Home Premium (64-bit edition)&lt;/P&gt;&lt;P&gt;Microsoft Visual Studio 2010 Ultimate&lt;/P&gt;&lt;P&gt;AutoCAD 2012 Structural Detailing (64-bit version)&lt;/P&gt;&lt;P&gt;and I have AutoCAD VBA Enabler installed too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can these information help?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 09:01:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3380979#M56759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-22T09:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3382203#M56760</link>
      <description>&lt;P&gt;Well, I am able to run your code (with my message filter code) without incident.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing on WinXP&amp;nbsp;32 bit,&amp;nbsp;with AutoCAD 2012, Visual Studio 2010 Professional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also built the program (with "Any CPU" as the Target platform)&amp;nbsp;and ran it on a Windows 7 Professional 64 bit, with AutoCAD 2012 64 bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neither my dev machine nor the users machine has the VBA enabler installed, but I can't imagine that being the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Might I suggest you try what&amp;nbsp;I did and see what happens.&amp;nbsp; To run your code, I had to create a form and stick a button on it, but then I added a ListBox control, and added a line to the ListBox in each of the message filter functions, and as status updates as the code went through your process.&amp;nbsp; I have attached my modified version.&amp;nbsp; Try adding a ListBox to your form and running this new code, to see if you get any messages in the ListBox.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 19:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3382203#M56760</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2012-03-22T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Question: Using AutoCAD 2012 through an external EXE</title>
      <link>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3382325#M56761</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Actually&amp;nbsp;&lt;/SPAN&gt;your code worked without any error, here is a summarized version of it's output (I replaced the listbox with a textbox in order to be able to copy from it):&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Pending: (336 times)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AutoCAD Started:18.2s (LMS Tech)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pending: (2 times)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Retry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pending: (48 times)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Circle Drawn&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pending: (3 times)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Line Drawn&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pending: (2 times)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Doc Closed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pending: (5 times)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cad Closed&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tested it repeatedly and it worked every time, that is weird because your code is not different from my code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't concentrate right now, I will test your code thoroughly tomorrow and I'll post any problem that might occur.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 21:12:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/question-using-autocad-2012-through-an-external-exe/m-p/3382325#M56761</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-22T21:12:51Z</dc:date>
    </item>
  </channel>
</rss>

