<?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: documentation on how to connect to autocad from an exe in vb.net in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7800757#M27209</link>
    <description>&lt;P&gt;Well, I am not a fan of using EXE to control AutoCAD, as I said in other post, here is the usual way to do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dim cadApp As AcadApplciation = Nothing&lt;/P&gt;
&lt;P&gt;Dim doc As AcadDocument = Nothing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp; '' Connect to existing AutoCAD session&lt;/P&gt;
&lt;P&gt;&amp;nbsp; cadApp=GetObject(, "AutoCAD.Application")&lt;/P&gt;
&lt;P&gt;Catch&lt;/P&gt;
&lt;P&gt;&amp;nbsp; '' If no existing AutoCAD session, start one&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; cadApp = CreateObject("AutoCAD.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Catch&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; MsgBox("Cannot connect to AutoCAD!")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Return&lt;/P&gt;
&lt;P&gt;&amp;nbsp; End Try&lt;/P&gt;
&lt;P&gt;End Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;doc=cadApp.Documents.Open("c:\....\myDrawingh.dwg"....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you have the AcadDocument that is equivalent to ThisDrawing in VBA. Do whatever you want to, as you do in AutoCAD VBA, just&amp;nbsp;be aware of&amp;nbsp;the syntext different from VB.NET and VBA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2018 18:40:20 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2018-02-22T18:40:20Z</dc:date>
    <item>
      <title>documentation on how to connect to autocad from an exe in vb.net</title>
      <link>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7800199#M27207</link>
      <description>&lt;P&gt;Where is the documentation on how to connect to autocad from an exe in vb.net?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;SPAN&gt;ObjectARX&amp;nbsp;&lt;/SPAN&gt;is not appropriate, and the standard VBA code doesn't works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had spent hours trying to find how to replace "&lt;SPAN&gt;ThisDrawing&lt;/SPAN&gt;" (=autocad drawing on VBA) on a VB.NET project to create a new layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot find the VB.NET way of doing&amp;nbsp;ThisDrawing.Layers.Add(layerName)&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 16:16:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7800199#M27207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-22T16:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: documentation on how to connect to autocad from an exe in vb.net</title>
      <link>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7800237#M27208</link>
      <description>&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/vb-net-equivalent-for-thisdrawing-path/td-p/5145672" target="_blank"&gt;Here &lt;/A&gt;it says&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/111219"&gt;@StephenPreston&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;The .NET equivalent of ThisDrawing is Application.DocumentManager.mdiActiveDocument.Database. The Database class has a Filename property that returns the DWG filepath and name.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but that's only available from ObjectARX, which cannot be accessed from an EXE&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 16:23:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7800237#M27208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-22T16:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: documentation on how to connect to autocad from an exe in vb.net</title>
      <link>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7800757#M27209</link>
      <description>&lt;P&gt;Well, I am not a fan of using EXE to control AutoCAD, as I said in other post, here is the usual way to do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dim cadApp As AcadApplciation = Nothing&lt;/P&gt;
&lt;P&gt;Dim doc As AcadDocument = Nothing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp; '' Connect to existing AutoCAD session&lt;/P&gt;
&lt;P&gt;&amp;nbsp; cadApp=GetObject(, "AutoCAD.Application")&lt;/P&gt;
&lt;P&gt;Catch&lt;/P&gt;
&lt;P&gt;&amp;nbsp; '' If no existing AutoCAD session, start one&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; cadApp = CreateObject("AutoCAD.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Catch&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; MsgBox("Cannot connect to AutoCAD!")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Return&lt;/P&gt;
&lt;P&gt;&amp;nbsp; End Try&lt;/P&gt;
&lt;P&gt;End Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;doc=cadApp.Documents.Open("c:\....\myDrawingh.dwg"....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you have the AcadDocument that is equivalent to ThisDrawing in VBA. Do whatever you want to, as you do in AutoCAD VBA, just&amp;nbsp;be aware of&amp;nbsp;the syntext different from VB.NET and VBA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 18:40:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7800757#M27209</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-02-22T18:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: documentation on how to connect to autocad from an exe in vb.net</title>
      <link>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7802725#M27210</link>
      <description>&lt;P&gt;Ok, but where is the documentation?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 11:51:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7802725#M27210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T11:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: documentation on how to connect to autocad from an exe in vb.net</title>
      <link>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7802970#M27211</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Google: C# autocad connect to autocad&lt;/P&gt;
&lt;P&gt;(I know yo want VB.NET but searching C# will not mix&amp;nbsp; VBA, VB, VB.NET results)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2018/ENU/OARX-DevGuide-Managed/files/GUID-BFFF308E-CC10-4C56-A81E-C15FB300EB70-htm.html" target="_blank"&gt;https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2018/ENU/OARX-DevGuide-Managed/files/GUID-BFFF308E-CC10-4C56-A81E-C15FB300EB70-htm.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2007/12/launching-autoc.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2007/12/launching-autoc.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.codeproject.com/Articles/840798/AutoCAD-D-Drawing-using-Csharp-with-AutoCAD-COM-AP" target="_blank"&gt;https://www.codeproject.com/Articles/840798/AutoCAD-D-Drawing-using-Csharp-with-AutoCAD-COM-AP&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 13:25:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/documentation-on-how-to-connect-to-autocad-from-an-exe-in-vb-net/m-p/7802970#M27211</guid>
      <dc:creator>SENL1362</dc:creator>
      <dc:date>2018-02-23T13:25:20Z</dc:date>
    </item>
  </channel>
</rss>

