<?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 COM + External App in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049693#M30238</link>
    <description>I'd like to have a COM interface that can wrap some functions in my app, and
i'd like for that interface to be called from, for example, a stand alone VB
EXE.  I must admit that i don't know a whole bunch about COM.  That being
said, i can very easily make a COM class that can be use via the VBA for
AutoCAD.  But if i try to make an external VB app, it is never able to
instantiate my COM class.  I assume this is because the COM class needs to
be in the presence of AutoCAD, and my external app doesn't "know" that
AutoCAD is up and running.

What do i need to do to expose COM classes from my ARX to external apps?

Thanks!

-Rich</description>
    <pubDate>Fri, 04 Jun 2004 09:22:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2004-06-04T09:22:59Z</dc:date>
    <item>
      <title>COM + External App</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049693#M30238</link>
      <description>I'd like to have a COM interface that can wrap some functions in my app, and
i'd like for that interface to be called from, for example, a stand alone VB
EXE.  I must admit that i don't know a whole bunch about COM.  That being
said, i can very easily make a COM class that can be use via the VBA for
AutoCAD.  But if i try to make an external VB app, it is never able to
instantiate my COM class.  I assume this is because the COM class needs to
be in the presence of AutoCAD, and my external app doesn't "know" that
AutoCAD is up and running.

What do i need to do to expose COM classes from my ARX to external apps?

Thanks!

-Rich</description>
      <pubDate>Fri, 04 Jun 2004 09:22:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049693#M30238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-04T09:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: COM + External App</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049694#M30239</link>
      <description>A COM server that links to AutoCAD or its ARX libraries
must be an in-process server (meaning it must be loaded
into AutoCAD's process space).  Hence, you cannot load
such a COM server into another client process.

To use an ARX based COM server from a client, you must
load it via the GetInterfaceObject() method of the AutoCAD
Application object, rather than the GetObject() method.

If your client doesn't know AutoCAD is running, it must
either start one, or try to connect to a running instance.

-- 
http://www.caddzone.com

AutoCAD based Security Planning Solutions:
http://www.caddzone.com/securityplanning

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com


"Justavian" &lt;RPRIDDY&gt; wrote in message news:40c03eb4$1_2@newsprd01...
&amp;gt; I'd like to have a COM interface that can wrap some functions in my app, and
&amp;gt; i'd like for that interface to be called from, for example, a stand alone VB
&amp;gt; EXE.  I must admit that i don't know a whole bunch about COM.  That being
&amp;gt; said, i can very easily make a COM class that can be use via the VBA for
&amp;gt; AutoCAD.  But if i try to make an external VB app, it is never able to
&amp;gt; instantiate my COM class.  I assume this is because the COM class needs to
&amp;gt; be in the presence of AutoCAD, and my external app doesn't "know" that
&amp;gt; AutoCAD is up and running.
&amp;gt;
&amp;gt; What do i need to do to expose COM classes from my ARX to external apps?
&amp;gt;
&amp;gt; Thanks!
&amp;gt;
&amp;gt; -Rich
&amp;gt;
&amp;gt;&lt;/RPRIDDY&gt;</description>
      <pubDate>Fri, 04 Jun 2004 10:08:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049694#M30239</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-04T10:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: COM + External App</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049695#M30240</link>
      <description>Wow.  Amazingly i've been off and on trying to do this for like a year, and
after just spending about 12 hours on it, i managed to figure it out.  &lt;PATS self="" on="" back=""&gt;

Just in case anyone else is having this problem - basically i couldn't
instantiate my COM class directly.  Instead, i needed to instantiate an
AcadApplication in my VB project, and after retrieving it via GetObject(,
"AutoCAD.Application"), i could then use acadApp.GetInterfaceObject() to
retrieve an instance of my COM class.


-Rich

"Justavian" &lt;RPRIDDY&gt; wrote in message
news:40c03eb4$1_2@newsprd01...
&amp;gt; I'd like to have a COM interface that can wrap some functions in my app,
and
&amp;gt; i'd like for that interface to be called from, for example, a stand alone
VB
&amp;gt; EXE.  I must admit that i don't know a whole bunch about COM.  That being
&amp;gt; said, i can very easily make a COM class that can be use via the VBA for
&amp;gt; AutoCAD.  But if i try to make an external VB app, it is never able to
&amp;gt; instantiate my COM class.  I assume this is because the COM class needs to
&amp;gt; be in the presence of AutoCAD, and my external app doesn't "know" that
&amp;gt; AutoCAD is up and running.
&amp;gt;
&amp;gt; What do i need to do to expose COM classes from my ARX to external apps?
&amp;gt;
&amp;gt; Thanks!
&amp;gt;
&amp;gt; -Rich
&amp;gt;
&amp;gt;&lt;/RPRIDDY&gt;&lt;/PATS&gt;</description>
      <pubDate>Fri, 04 Jun 2004 10:26:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049695#M30240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-04T10:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: COM + External App</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049696#M30241</link>
      <description>I'm working on a C++ app (as an ARX) that I may want to be able to call it's
functions from VBA within Acad.  I know very little about COM, but I think I
understand enough to know that I will need to use it.  Can you offer any
suggestions?  Is there a 'COM for Dummies'?

-- 
Thanks,
Martin Schmid, EIT, CCSA, MCDBA, MCSE


"Justavian" &lt;RPRIDDY&gt; wrote in message
news:40c03eb4$1_2@newsprd01...
&amp;gt; I'd like to have a COM interface that can wrap some functions in my app,
and
&amp;gt; i'd like for that interface to be called from, for example, a stand alone
VB
&amp;gt; EXE.  I must admit that i don't know a whole bunch about COM.  That being
&amp;gt; said, i can very easily make a COM class that can be use via the VBA for
&amp;gt; AutoCAD.  But if i try to make an external VB app, it is never able to
&amp;gt; instantiate my COM class.  I assume this is because the COM class needs to
&amp;gt; be in the presence of AutoCAD, and my external app doesn't "know" that
&amp;gt; AutoCAD is up and running.
&amp;gt;
&amp;gt; What do i need to do to expose COM classes from my ARX to external apps?
&amp;gt;
&amp;gt; Thanks!
&amp;gt;
&amp;gt; -Rich
&amp;gt;
&amp;gt;&lt;/RPRIDDY&gt;</description>
      <pubDate>Fri, 04 Jun 2004 11:39:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049696#M30241</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-04T11:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: COM + External App</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049697#M30242</link>
      <description>If all you need to do is use it in VBA, it's quite easy.

1)  Use the "New ATL Object" button on the ARX toolbar.
2)  Choose "Simple Object"
3)  Enter a name for your COM class.
4)  On the Attributes tab, check the Support ISupportErrorInfo box.
5)  Hit ok.
6)  Find the interface for your class in the Class View - has a different
icon from normal classes.
7)  Right click to add methods, etc.

So implement whatever methods you want, and you should be ready to go.  Now
when you load your ARX into AutoCAD, go to the VBA editor and add a
reference to your ARX (actually, it might already be added - i can't
remember).  You can now make an instace of that class and use it.

-Rich


"Martin Schmid" &lt;MXRTXNXSCHMXD&gt; wrote in message
news:40c05f64$1_3@newsprd01...
&amp;gt; I'm working on a C++ app (as an ARX) that I may want to be able to call
it's
&amp;gt; functions from VBA within Acad.  I know very little about COM, but I think
I
&amp;gt; understand enough to know that I will need to use it.  Can you offer any
&amp;gt; suggestions?  Is there a 'COM for Dummies'?
&amp;gt;
&amp;gt; -- 
&amp;gt; Thanks,
&amp;gt; Martin Schmid, EIT, CCSA, MCDBA, MCSE
&amp;gt;
&amp;gt;
&amp;gt; "Justavian" &lt;RPRIDDY&gt; wrote in message
&amp;gt; news:40c03eb4$1_2@newsprd01...
&amp;gt; &amp;gt; I'd like to have a COM interface that can wrap some functions in my app,
&amp;gt; and
&amp;gt; &amp;gt; i'd like for that interface to be called from, for example, a stand
alone
&amp;gt; VB
&amp;gt; &amp;gt; EXE.  I must admit that i don't know a whole bunch about COM.  That
being
&amp;gt; &amp;gt; said, i can very easily make a COM class that can be use via the VBA for
&amp;gt; &amp;gt; AutoCAD.  But if i try to make an external VB app, it is never able to
&amp;gt; &amp;gt; instantiate my COM class.  I assume this is because the COM class needs
to
&amp;gt; &amp;gt; be in the presence of AutoCAD, and my external app doesn't "know" that
&amp;gt; &amp;gt; AutoCAD is up and running.
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; What do i need to do to expose COM classes from my ARX to external apps?
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; Thanks!
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; -Rich
&amp;gt; &amp;gt;
&amp;gt; &amp;gt;
&amp;gt;
&amp;gt;&lt;/RPRIDDY&gt;&lt;/MXRTXNXSCHMXD&gt;</description>
      <pubDate>Fri, 04 Jun 2004 12:32:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049697#M30242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-04T12:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: COM + External App</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049698#M30243</link>
      <description>If you want to understand the internals of COM/Automation, a good book I've
found is "Visual C++ .NET Bible" by Archer &amp;amp; Whitechapel. A large portion of
the book is dedicated to various aspects of COM programming in an
easy-to-follow way.

However, you can easily get away using and understanding just enough COM to
interact with VBA and AutoCAD by just imitating the samples. Just make sure
your project uses ATL. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Look at the property palette samples, as all
those properties are accessible from VBA. that should get you started.

Andrew


"Martin Schmid" &lt;MXRTXNXSCHMXD&gt; wrote in message
news:40c05f64$1_3@newsprd01...
&amp;gt; I'm working on a C++ app (as an ARX) that I may want to be able to call
it's
&amp;gt; functions from VBA within Acad.  I know very little about COM, but I think
I
&amp;gt; understand enough to know that I will need to use it.  Can you offer any
&amp;gt; suggestions?  Is there a 'COM for Dummies'?
&amp;gt;
&amp;gt; -- 
&amp;gt; Thanks,
&amp;gt; Martin Schmid, EIT, CCSA, MCDBA, MCSE
&amp;gt;
&amp;gt;
&amp;gt; "Justavian" &lt;RPRIDDY&gt; wrote in message
&amp;gt; news:40c03eb4$1_2@newsprd01...
&amp;gt; &amp;gt; I'd like to have a COM interface that can wrap some functions in my app,
&amp;gt; and
&amp;gt; &amp;gt; i'd like for that interface to be called from, for example, a stand
alone
&amp;gt; VB
&amp;gt; &amp;gt; EXE.  I must admit that i don't know a whole bunch about COM.  That
being
&amp;gt; &amp;gt; said, i can very easily make a COM class that can be use via the VBA for
&amp;gt; &amp;gt; AutoCAD.  But if i try to make an external VB app, it is never able to
&amp;gt; &amp;gt; instantiate my COM class.  I assume this is because the COM class needs
to
&amp;gt; &amp;gt; be in the presence of AutoCAD, and my external app doesn't "know" that
&amp;gt; &amp;gt; AutoCAD is up and running.
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; What do i need to do to expose COM classes from my ARX to external apps?
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; Thanks!
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; -Rich
&amp;gt; &amp;gt;
&amp;gt; &amp;gt;
&amp;gt;
&amp;gt;&lt;/RPRIDDY&gt;&lt;/MXRTXNXSCHMXD&gt;</description>
      <pubDate>Fri, 04 Jun 2004 15:09:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049698#M30243</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-04T15:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: COM + External App</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049699#M30244</link>
      <description>Hmmm - this just showed up for me, six hours after it says it was posted.
Had it appeared when the time says it was posted, i would have this problem
solved 20 minutes sooner!

Thanks for the response Tony...

-Rich



"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message
news:40c0a646$1_1@newsprd01...
&amp;gt; A COM server that links to AutoCAD or its ARX libraries
&amp;gt; must be an in-process server (meaning it must be loaded
&amp;gt; into AutoCAD's process space).  Hence, you cannot load
&amp;gt; such a COM server into another client process.
&amp;gt;
&amp;gt; To use an ARX based COM server from a client, you must
&amp;gt; load it via the GetInterfaceObject() method of the AutoCAD
&amp;gt; Application object, rather than the GetObject() method.
&amp;gt;
&amp;gt; If your client doesn't know AutoCAD is running, it must
&amp;gt; either start one, or try to connect to a running instance.
&amp;gt;
&amp;gt; -- 
&amp;gt; http://www.caddzone.com
&amp;gt;
&amp;gt; AutoCAD based Security Planning Solutions:
&amp;gt; http://www.caddzone.com/securityplanning
&amp;gt;
&amp;gt; AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
&amp;gt; http://www.acadxtabs.com
&amp;gt;
&amp;gt;
&amp;gt; "Justavian" &lt;RPRIDDY&gt; wrote in message
news:40c03eb4$1_2@newsprd01...
&amp;gt; &amp;gt; I'd like to have a COM interface that can wrap some functions in my app,
and
&amp;gt; &amp;gt; i'd like for that interface to be called from, for example, a stand
alone VB
&amp;gt; &amp;gt; EXE.  I must admit that i don't know a whole bunch about COM.  That
being
&amp;gt; &amp;gt; said, i can very easily make a COM class that can be use via the VBA for
&amp;gt; &amp;gt; AutoCAD.  But if i try to make an external VB app, it is never able to
&amp;gt; &amp;gt; instantiate my COM class.  I assume this is because the COM class needs
to
&amp;gt; &amp;gt; be in the presence of AutoCAD, and my external app doesn't "know" that
&amp;gt; &amp;gt; AutoCAD is up and running.
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; What do i need to do to expose COM classes from my ARX to external apps?
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; Thanks!
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; -Rich
&amp;gt; &amp;gt;
&amp;gt; &amp;gt;
&amp;gt;
&amp;gt;&lt;/RPRIDDY&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Fri, 04 Jun 2004 16:58:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/com-external-app/m-p/1049699#M30244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-04T16:58:22Z</dc:date>
    </item>
  </channel>
</rss>

