<?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 routine to VB.NET in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2496001#M70301</link>
    <description>Is there a reason for using late binding?</description>
    <pubDate>Thu, 28 May 2009 15:36:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-05-28T15:36:55Z</dc:date>
    <item>
      <title>VB routine to VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2495997#M70297</link>
      <description>Hello,&lt;BR /&gt;
 &lt;BR /&gt;
I have a few years experience working with VB6 and VBA in combination with AutoCad. Now due to various reasons I would like to switch to VB.NET. For that I have downloaded Visual Basic 2008 Express. &lt;BR /&gt;
&lt;BR /&gt;
Attached I added  a VB routine that I would like to use in Visual Basic 2008 Express. &lt;BR /&gt;
&lt;BR /&gt;
Does anybody know how to convert this &lt;BR /&gt;
&lt;BR /&gt;
Thx in advance. &lt;BR /&gt;
&lt;BR /&gt;
Wiebe</description>
      <pubDate>Thu, 28 May 2009 11:32:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2495997#M70297</guid>
      <dc:creator>gizmowiebe</dc:creator>
      <dc:date>2009-05-28T11:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: VB routine to VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2495998#M70298</link>
      <description>If you just want to get this into VB.NET pretty much as is then:&lt;BR /&gt;
&lt;BR /&gt;
1) Create a new project.&lt;BR /&gt;
2) Paste the code into a suitable place - a button click event in a windows app or Sub Main() of a console app.&lt;BR /&gt;
3) Add references to the AutoCAD and AutoCAD/ObjectDBX type libraries.&lt;BR /&gt;
4) Import the namespaces you'll be using (unless you want to fully qualify everything) - Autodesk.AutoCAD.Interop and Autodesk.AutoCAD.Interop.Common.&lt;BR /&gt;
5) Declare your undeclared variables.&lt;BR /&gt;
6) Fix your unterminated If blocks and For loop.&lt;BR /&gt;
7) Enjoy.&lt;BR /&gt;
&lt;BR /&gt;
Caution: Contents may be hot.  Your mileage may vary.  Results may not be typical.&lt;BR /&gt;
&lt;BR /&gt;
No bytes were harmed during the production of this post.</description>
      <pubDate>Thu, 28 May 2009 14:20:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2495998#M70298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-28T14:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: VB routine to VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2495999#M70299</link>
      <description>Thx fantum for your prompt reply.&lt;BR /&gt;
&lt;BR /&gt;
I got as far as the function attached. But everytime I get a HRESULT: 0x8007007E error on the blockreference parts.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas?&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
Wiebe</description>
      <pubDate>Thu, 28 May 2009 14:56:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2495999#M70299</guid>
      <dc:creator>gizmowiebe</dc:creator>
      <dc:date>2009-05-28T14:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: VB routine to VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2496000#M70300</link>
      <description>Since you are Late Bound you don't have any type defined. &lt;BR /&gt;
Use typename instead.&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
For Each entity In dbxDoc.ModelSpace&lt;BR /&gt;
     If TypeName(entity) = "IAcadBlockReference" Then&lt;BR /&gt;
          MsgBox(entity.name)&lt;BR /&gt;
     End If&lt;BR /&gt;
Next entity&lt;BR /&gt;
{code}</description>
      <pubDate>Thu, 28 May 2009 15:20:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2496000#M70300</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2009-05-28T15:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: VB routine to VB.NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2496001#M70301</link>
      <description>Is there a reason for using late binding?</description>
      <pubDate>Thu, 28 May 2009 15:36:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-routine-to-vb-net/m-p/2496001#M70301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-28T15:36:55Z</dc:date>
    </item>
  </channel>
</rss>

