<?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: VB6 connection to Map 6 Problem in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/vb6-connection-to-map-6-problem/m-p/625716#M4631</link>
    <description>Bryan,&lt;BR /&gt;
&lt;BR /&gt;
Try using "AutoCADMap.Application.2" .&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps.&lt;BR /&gt;
&lt;BR /&gt;
Gary.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Bryan Waller" &lt;BWALLER&gt; wrote in message&lt;BR /&gt;
news:8EFA6C0032DD149A6C271C82A52D5CC9@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi Group,&lt;BR /&gt;
&amp;gt; I have been attempting to connect to Autodesk Map 7 to create a EXE or DLL&lt;BR /&gt;
&amp;gt; and the code that worked for Map 6 no longer appears to work.  Essentially&lt;BR /&gt;
&amp;gt; what is below is what I have used in Map 6 (minus the ".16"), but does not&lt;BR /&gt;
&amp;gt; work any longer in Map 7.  I have tried endless permutations of this,&lt;BR /&gt;
dimmed&lt;BR /&gt;
&amp;gt; everything as 'Object', but can only get as far as an AutoCad Document and&lt;BR /&gt;
&amp;gt; then when trying to get map with 'GetInterfaceObject' the code fails.  The&lt;BR /&gt;
&amp;gt; 'GetInterfaceObject' works for other apps such as the layer manager etc.&lt;BR /&gt;
but&lt;BR /&gt;
&amp;gt; not for map.  The code in the Help for both Map 6 &amp;amp; 7 is WRONG and does&lt;BR /&gt;
not&lt;BR /&gt;
&amp;gt; help a bit.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Is anyone developing map with VB or must everything be done in VBA?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks for your help.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '******My Code Follows******&lt;BR /&gt;
&amp;gt; Option Explicit&lt;BR /&gt;
&amp;gt; Public acadapp As AcadApplication&lt;BR /&gt;
&amp;gt; Public acaddoc As AcadDocument&lt;BR /&gt;
&amp;gt; Public acmap As Object&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Public Sub main()&lt;BR /&gt;
&amp;gt;     Set acadapp = GetObject(, "AutoCad.application.16")&lt;BR /&gt;
&amp;gt;     Set acaddoc = acadapp.ActiveDocument&lt;BR /&gt;
&amp;gt;     Set acmap = acadapp.GetInterfaceObject("AutoCadMap.application.16")&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/BWALLER&gt;</description>
    <pubDate>Fri, 21 Nov 2003 12:20:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-11-21T12:20:39Z</dc:date>
    <item>
      <title>VB6 connection to Map 6 Problem</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/vb6-connection-to-map-6-problem/m-p/625715#M4630</link>
      <description>Hi Group,&lt;BR /&gt;
I have been attempting to connect to Autodesk Map 7 to create a EXE or DLL&lt;BR /&gt;
and the code that worked for Map 6 no longer appears to work.  Essentially&lt;BR /&gt;
what is below is what I have used in Map 6 (minus the ".16"), but does not&lt;BR /&gt;
work any longer in Map 7.  I have tried endless permutations of this, dimmed&lt;BR /&gt;
everything as 'Object', but can only get as far as an AutoCad Document and&lt;BR /&gt;
then when trying to get map with 'GetInterfaceObject' the code fails.  The&lt;BR /&gt;
'GetInterfaceObject' works for other apps such as the layer manager etc. but&lt;BR /&gt;
not for map.  The code in the Help for both Map 6 &amp;amp; 7 is WRONG and does not&lt;BR /&gt;
help a bit.&lt;BR /&gt;
&lt;BR /&gt;
Is anyone developing map with VB or must everything be done in VBA?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.&lt;BR /&gt;
&lt;BR /&gt;
'******My Code Follows******&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
Public acadapp As AcadApplication&lt;BR /&gt;
Public acaddoc As AcadDocument&lt;BR /&gt;
Public acmap As Object&lt;BR /&gt;
&lt;BR /&gt;
Public Sub main()&lt;BR /&gt;
    Set acadapp = GetObject(, "AutoCad.application.16")&lt;BR /&gt;
    Set acaddoc = acadapp.ActiveDocument&lt;BR /&gt;
    Set acmap = acadapp.GetInterfaceObject("AutoCadMap.application.16")&lt;BR /&gt;
End Sub</description>
      <pubDate>Fri, 21 Nov 2003 07:24:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/vb6-connection-to-map-6-problem/m-p/625715#M4630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-21T07:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: VB6 connection to Map 6 Problem</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/vb6-connection-to-map-6-problem/m-p/625716#M4631</link>
      <description>Bryan,&lt;BR /&gt;
&lt;BR /&gt;
Try using "AutoCADMap.Application.2" .&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps.&lt;BR /&gt;
&lt;BR /&gt;
Gary.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Bryan Waller" &lt;BWALLER&gt; wrote in message&lt;BR /&gt;
news:8EFA6C0032DD149A6C271C82A52D5CC9@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi Group,&lt;BR /&gt;
&amp;gt; I have been attempting to connect to Autodesk Map 7 to create a EXE or DLL&lt;BR /&gt;
&amp;gt; and the code that worked for Map 6 no longer appears to work.  Essentially&lt;BR /&gt;
&amp;gt; what is below is what I have used in Map 6 (minus the ".16"), but does not&lt;BR /&gt;
&amp;gt; work any longer in Map 7.  I have tried endless permutations of this,&lt;BR /&gt;
dimmed&lt;BR /&gt;
&amp;gt; everything as 'Object', but can only get as far as an AutoCad Document and&lt;BR /&gt;
&amp;gt; then when trying to get map with 'GetInterfaceObject' the code fails.  The&lt;BR /&gt;
&amp;gt; 'GetInterfaceObject' works for other apps such as the layer manager etc.&lt;BR /&gt;
but&lt;BR /&gt;
&amp;gt; not for map.  The code in the Help for both Map 6 &amp;amp; 7 is WRONG and does&lt;BR /&gt;
not&lt;BR /&gt;
&amp;gt; help a bit.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Is anyone developing map with VB or must everything be done in VBA?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks for your help.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; '******My Code Follows******&lt;BR /&gt;
&amp;gt; Option Explicit&lt;BR /&gt;
&amp;gt; Public acadapp As AcadApplication&lt;BR /&gt;
&amp;gt; Public acaddoc As AcadDocument&lt;BR /&gt;
&amp;gt; Public acmap As Object&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Public Sub main()&lt;BR /&gt;
&amp;gt;     Set acadapp = GetObject(, "AutoCad.application.16")&lt;BR /&gt;
&amp;gt;     Set acaddoc = acadapp.ActiveDocument&lt;BR /&gt;
&amp;gt;     Set acmap = acadapp.GetInterfaceObject("AutoCadMap.application.16")&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/BWALLER&gt;</description>
      <pubDate>Fri, 21 Nov 2003 12:20:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/vb6-connection-to-map-6-problem/m-p/625716#M4631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-21T12:20:39Z</dc:date>
    </item>
  </channel>
</rss>

