<?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: VB.NET Reference to &amp;quot;thisdrawing&amp;quot; in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791863#M80118</link>
    <description>This is generaly true, but it's not absolute.&lt;BR /&gt;
Open the following link for a workaround.&lt;BR /&gt;
http://snippetsandmusings.blogspot.com/2005/12/net-remoting-and-autocad-managed.html</description>
    <pubDate>Mon, 16 Oct 2006 09:23:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-10-16T09:23:25Z</dc:date>
    <item>
      <title>VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791858#M80113</link>
      <description>I am trying to convert a VBA program into a VB.NET program. I am wondering how do I get a reference to "thisdrawing", or the currently active drawing using VB.NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Sat, 14 Oct 2006 20:08:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791858#M80113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-14T20:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791859#M80114</link>
      <description>ok i think im on the right track but i cant get intelli-sence to recognize Autodesk.ApplicationServices im not sure what reference library im missing...</description>
      <pubDate>Sat, 14 Oct 2006 21:13:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791859#M80114</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-14T21:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791860#M80115</link>
      <description>ok i fixed that problem...&lt;BR /&gt;
&lt;BR /&gt;
I am trying to get a reference to the currently active drawing, but im getting an error on the first step. FileNotFoundException was unhandled. The specified module could not be found. (Exception from HRESULT: 0x8007007E)&lt;BR /&gt;
&lt;BR /&gt;
The inner exception is null and the file name is null... I get the error with the following code:&lt;BR /&gt;
&lt;BR /&gt;
Imports Autodesk.AutoCAD.Interop&lt;BR /&gt;
Imports Autodesk.AutoCAD&lt;BR /&gt;
&lt;BR /&gt;
Public Class Form1&lt;BR /&gt;
&lt;BR /&gt;
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;BR /&gt;
Dim AcadApp As AcadApplication&lt;BR /&gt;
AcadApp = CType(ApplicationServices.Application.AcadApplication, AcadApplication)&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
End Class&lt;BR /&gt;
&lt;BR /&gt;
If I comment out AcadApp = CType(ApplicationServices.Application.AcadApplication, AcadApplication) i no longer get the error, but if i put it in a try catch, it wont catch it... what am i doing wrong?</description>
      <pubDate>Sat, 14 Oct 2006 21:17:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791860#M80115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-14T21:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791861#M80116</link>
      <description>I was just going to post a message for the exact same thing. &lt;BR /&gt;
&lt;BR /&gt;
Please post the answer if you find it.&lt;BR /&gt;
&lt;BR /&gt;
Cheers.</description>
      <pubDate>Mon, 16 Oct 2006 05:52:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791861#M80116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-16T05:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791862#M80117</link>
      <description>I just found the answer to my problem (and its bad).&lt;BR /&gt;
&lt;BR /&gt;
I  don't know if it applies to you.&lt;BR /&gt;
&lt;BR /&gt;
&lt;QUOTE&gt;&lt;BR /&gt;
You can't use the managed wrappers for ObjectARX&lt;BR /&gt;
in a standalone application, or from any other process.&lt;BR /&gt;
&lt;BR /&gt;
They can only be used by a DLL that's loaded into&lt;BR /&gt;
AutoCAD using NETLOAD.&lt;BR /&gt;
&lt;/QUOTE&gt;&lt;BR /&gt;
&lt;BR /&gt;
hth</description>
      <pubDate>Mon, 16 Oct 2006 08:46:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791862#M80117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-16T08:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791863#M80118</link>
      <description>This is generaly true, but it's not absolute.&lt;BR /&gt;
Open the following link for a workaround.&lt;BR /&gt;
http://snippetsandmusings.blogspot.com/2005/12/net-remoting-and-autocad-managed.html</description>
      <pubDate>Mon, 16 Oct 2006 09:23:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791863#M80118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-16T09:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791864#M80119</link>
      <description>Thanks I found that last night and put it in my favorites.&lt;BR /&gt;
&lt;BR /&gt;
I need to create a custom palette so I don't know if it will help in my case. I haven't really read it closely yet.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the info all the same. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 16 Oct 2006 22:09:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791864#M80119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-16T22:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791865#M80120</link>
      <description>Wow. That helps emencely. Thank you.</description>
      <pubDate>Fri, 03 Nov 2006 05:08:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791865#M80120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-03T05:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791866#M80121</link>
      <description>Hey guys, I and trying this same thing and I am getting no where?  Can you help me out?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Big R</description>
      <pubDate>Mon, 04 Aug 2008 13:31:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791866#M80121</guid>
      <dc:creator>rmichels</dc:creator>
      <dc:date>2008-08-04T13:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791867#M80122</link>
      <description>&lt;COMMANDMETHOD&gt; _&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ThisDrawing()&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
&lt;BR /&gt;
MsgBox("ThisDrawing = " &amp;amp; &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Name)&lt;BR /&gt;
&lt;BR /&gt;
Catch ex As System.Exception&lt;BR /&gt;
&lt;BR /&gt;
MsgBox(ex.Message)&lt;BR /&gt;
&lt;BR /&gt;
End Try&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BIGR1822&gt; wrote in message news:5997576@discussion.autodesk.com...&lt;BR /&gt;
Hey guys, I and trying this same thing and I am getting no where?  Can you &lt;BR /&gt;
help me out?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Big R&lt;/BIGR1822&gt;&lt;/COMMANDMETHOD&gt;</description>
      <pubDate>Tue, 05 Aug 2008 18:56:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791867#M80122</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-05T18:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791868#M80123</link>
      <description>I'm afraid it's not nearly as simple as Joe seems to think. There's no functional equivalent to VBA's 'ThisDrawing' in .NET.&lt;BR /&gt;
&lt;BR /&gt;
In VBA, 'ThisDrawing' is a reference to the active document, and its events. &lt;BR /&gt;
&lt;BR /&gt;
When you handle an event of 'ThisDrawing' in VBA, the event fires for every document, not only the one you manually reference via MdiActiveDocument.  In .NET, if you add a handler to an event of Document object returned by MdiActiveDocument, the event fires only for that document, it does not fire fir every document.&lt;BR /&gt;
&lt;BR /&gt;
In VB.NET, you have to handle the events of the DocumentCollection class (e.g., DocumentAdded and DocumentToBeDestroyed), and in the handlers of those events, you must add/remove Document event handlers for each document.&lt;BR /&gt;
&lt;BR /&gt;
I'm afraid that's not a trival task especially for an entry level programmer, however. &lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BIGR1822&gt; wrote in message news:5997576@discussion.autodesk.com...&lt;BR /&gt;
Hey guys, I and trying this same thing and I am getting no where?  Can you help me out?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Big R&lt;/BIGR1822&gt;</description>
      <pubDate>Tue, 05 Aug 2008 21:43:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791868#M80123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-05T21:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791869#M80124</link>
      <description>I cant access that link. it says i dont have access and its invite only?&lt;BR /&gt;
How can i read it?</description>
      <pubDate>Thu, 02 Jul 2009 07:49:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/1791869#M80124</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-02T07:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Reference to "thisdrawing"</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/2735511#M80125</link>
      <description>&lt;P&gt;Hi Pavlos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can´t &lt;SPAN class="short_text"&gt;&lt;SPAN&gt;read the blog, I need an authorization,can you&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN&gt; help me?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2010 06:18:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-reference-to-quot-thisdrawing-quot/m-p/2735511#M80125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-04T06:18:24Z</dc:date>
    </item>
  </channel>
</rss>

