<?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: Converting code to .dll file. Problems with 2009. in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/converting-code-to-dll-file-problems-with-2009/m-p/2599654#M14374</link>
    <description>I'm trying to stumble onto a solution.&lt;BR /&gt;
&lt;BR /&gt;
I've changed it to this:&lt;BR /&gt;
&lt;BR /&gt;
Dim DbxDoc As Object 'New AxDbDocument&lt;BR /&gt;
Set DbxDoc = GetInterfaceObject("ObjectDBX.AxDbDocument.17")&lt;BR /&gt;
DbxDoc.Open "C:\Program Files\Profile\Profile.dwg"&lt;BR /&gt;
&lt;BR /&gt;
and added the Autocad 2008 Type Library. Seems to work now however....&lt;BR /&gt;
&lt;BR /&gt;
Now I'm getting a problem on this line:&lt;BR /&gt;
sAngle = ThisDrawing.Utility.AngleFromXAxis(sp, ep)&lt;BR /&gt;
With an error saying "Automation error     Element not found"</description>
    <pubDate>Mon, 07 Dec 2009 17:38:51 GMT</pubDate>
    <dc:creator>sgrya1</dc:creator>
    <dc:date>2009-12-07T17:38:51Z</dc:date>
    <item>
      <title>Converting code to .dll file. Problems with 2009.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/converting-code-to-dll-file-problems-with-2009/m-p/2599653#M14373</link>
      <description>I don't understand the problem here but hopefully someone will make sense of it.&lt;BR /&gt;
&lt;BR /&gt;
I've have some code that I converted using VB6.0 for use from a .dll file. &lt;BR /&gt;
&lt;BR /&gt;
It used to work ok using a reference to AutoCAD/ObjectDBX common 17.0 Type Library but maybe it's because I now have 2009 that I can't successfully convert it to a .dll file.&lt;BR /&gt;
&lt;BR /&gt;
Now I get the error "Automation error Classfactory, cannot supply requested class" when trying to open a document using the following.&lt;BR /&gt;
&lt;BR /&gt;
Dim DbxDoc As New AxDbDocument&lt;BR /&gt;
DbxDoc.Open "C:\Profile.dwg"&lt;BR /&gt;
&lt;BR /&gt;
Most of my variable types are set to As Object (late binding apparently) but I can't Dim DbxDoc As New Object&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions very welcome.</description>
      <pubDate>Mon, 07 Dec 2009 15:09:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/converting-code-to-dll-file-problems-with-2009/m-p/2599653#M14373</guid>
      <dc:creator>sgrya1</dc:creator>
      <dc:date>2009-12-07T15:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Converting code to .dll file. Problems with 2009.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/converting-code-to-dll-file-problems-with-2009/m-p/2599654#M14374</link>
      <description>I'm trying to stumble onto a solution.&lt;BR /&gt;
&lt;BR /&gt;
I've changed it to this:&lt;BR /&gt;
&lt;BR /&gt;
Dim DbxDoc As Object 'New AxDbDocument&lt;BR /&gt;
Set DbxDoc = GetInterfaceObject("ObjectDBX.AxDbDocument.17")&lt;BR /&gt;
DbxDoc.Open "C:\Program Files\Profile\Profile.dwg"&lt;BR /&gt;
&lt;BR /&gt;
and added the Autocad 2008 Type Library. Seems to work now however....&lt;BR /&gt;
&lt;BR /&gt;
Now I'm getting a problem on this line:&lt;BR /&gt;
sAngle = ThisDrawing.Utility.AngleFromXAxis(sp, ep)&lt;BR /&gt;
With an error saying "Automation error     Element not found"</description>
      <pubDate>Mon, 07 Dec 2009 17:38:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/converting-code-to-dll-file-problems-with-2009/m-p/2599654#M14374</guid>
      <dc:creator>sgrya1</dc:creator>
      <dc:date>2009-12-07T17:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Converting code to .dll file. Problems with 2009.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/converting-code-to-dll-file-problems-with-2009/m-p/2599655#M14375</link>
      <description>To answer my second problem..I found someone else who experienced the same problem.&lt;BR /&gt;
&lt;BR /&gt;
I needed to repair my AutoCAD installation&lt;BR /&gt;
&lt;BR /&gt;
To reinstall or repair AutoCAD&lt;BR /&gt;
•	Start &amp;gt; Control Panel, double-click Add or Remove Programs.&lt;BR /&gt;
•	In Add or Remove Programs, select AutoCAD 2009, then click Change/Remove.&lt;BR /&gt;
&lt;BR /&gt;
There was nothing wrong with:&lt;BR /&gt;
&lt;BR /&gt;
Dim DbxDoc As New AxDbDocument&lt;BR /&gt;
DbxDoc.Open "C:\Profile.dwg"&lt;BR /&gt;
&lt;BR /&gt;
either. Must have been the Type Library I was trying to use.</description>
      <pubDate>Mon, 07 Dec 2009 19:35:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/converting-code-to-dll-file-problems-with-2009/m-p/2599655#M14375</guid>
      <dc:creator>sgrya1</dc:creator>
      <dc:date>2009-12-07T19:35:44Z</dc:date>
    </item>
  </channel>
</rss>

