<?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 AcEditorReactor doesn't work if ACRX_CONS_DEFINE_MEMBE used in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988351#M21042</link>
    <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I am writing sample codes in AutoCAD 2008 debug environment without using ObjectARX Wizard. I am just creating a dll with .arx extension.&lt;BR /&gt;
&lt;BR /&gt;
A reactor class named AsdkEdEmployeeReactor is created as a common c++ class. It inherits AcEditorReactor. The constructor is:&lt;BR /&gt;
if ( autoInitAndRelease ) {&lt;BR /&gt;
    if ( acedEditor )&lt;BR /&gt;
        acedEditor-&amp;gt;addReactor (this) ;&lt;BR /&gt;
    else&lt;BR /&gt;
        mbAutoInitAndRelease =false ;&lt;BR /&gt;
2 virtual methods - commandWillStart and commandEnded implemented.&lt;BR /&gt;
&lt;BR /&gt;
In acrxEntryPoint(...) method, a reactor object is created and added:&lt;BR /&gt;
pEdEmployeeReactor = new AsdkEdEmployeeReactor(true);&lt;BR /&gt;
&lt;BR /&gt;
Everything works fine in these simple ways. And the commandWillStart and commandEnded can be called when the user run commands. But if the ACRX_DECLARE_MEMBERS(AsdkEdEmployeeReactor)  and ACRX_CONS_DEFINE_MEMBERS(AsdkEdEmployeeReactor, AcEditorReactor, 0) are added the the class, the 2 virtual methods will not be invoked when commands are run. And this is the way the ObjectARX Wizard does when creating reactor class - the 2 macros will be added.&lt;BR /&gt;
&lt;BR /&gt;
This situation only happens on AcEditorReactor subclasses as I found. Those classes inheriting from AcDbDatabaseReactor and AcDbObjectReactor works well in spite of whether macros are added or not.&lt;BR /&gt;
&lt;BR /&gt;
Any information about that?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Jerry</description>
    <pubDate>Thu, 07 Jun 2007 03:22:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-06-07T03:22:17Z</dc:date>
    <item>
      <title>AcEditorReactor doesn't work if ACRX_CONS_DEFINE_MEMBE used</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988351#M21042</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I am writing sample codes in AutoCAD 2008 debug environment without using ObjectARX Wizard. I am just creating a dll with .arx extension.&lt;BR /&gt;
&lt;BR /&gt;
A reactor class named AsdkEdEmployeeReactor is created as a common c++ class. It inherits AcEditorReactor. The constructor is:&lt;BR /&gt;
if ( autoInitAndRelease ) {&lt;BR /&gt;
    if ( acedEditor )&lt;BR /&gt;
        acedEditor-&amp;gt;addReactor (this) ;&lt;BR /&gt;
    else&lt;BR /&gt;
        mbAutoInitAndRelease =false ;&lt;BR /&gt;
2 virtual methods - commandWillStart and commandEnded implemented.&lt;BR /&gt;
&lt;BR /&gt;
In acrxEntryPoint(...) method, a reactor object is created and added:&lt;BR /&gt;
pEdEmployeeReactor = new AsdkEdEmployeeReactor(true);&lt;BR /&gt;
&lt;BR /&gt;
Everything works fine in these simple ways. And the commandWillStart and commandEnded can be called when the user run commands. But if the ACRX_DECLARE_MEMBERS(AsdkEdEmployeeReactor)  and ACRX_CONS_DEFINE_MEMBERS(AsdkEdEmployeeReactor, AcEditorReactor, 0) are added the the class, the 2 virtual methods will not be invoked when commands are run. And this is the way the ObjectARX Wizard does when creating reactor class - the 2 macros will be added.&lt;BR /&gt;
&lt;BR /&gt;
This situation only happens on AcEditorReactor subclasses as I found. Those classes inheriting from AcDbDatabaseReactor and AcDbObjectReactor works well in spite of whether macros are added or not.&lt;BR /&gt;
&lt;BR /&gt;
Any information about that?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Jerry</description>
      <pubDate>Thu, 07 Jun 2007 03:22:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988351#M21042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-07T03:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: AcEditorReactor doesn't work if ACRX_CONS_DEFINE_MEMBE used</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988352#M21043</link>
      <description>Jerry:&lt;BR /&gt;
&lt;BR /&gt;
  Just a hunch, but make sure you 'Rebuild All' after making the change. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft ==&amp;gt; http://www.manusoft.com&lt;BR /&gt;
VP Americas, CADLock, Inc. ==&amp;gt; http://www.cadlock.com</description>
      <pubDate>Thu, 07 Jun 2007 04:30:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988352#M21043</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-07T04:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: AcEditorReactor doesn't work if ACRX_CONS_DEFINE_MEMBE used</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988353#M21044</link>
      <description>Yes. I "Clean" and "Rebuild All" and am sure I "Appload" the right .arx file. But the virtual methods still don't work if the macros are added.&lt;BR /&gt;
What do these macors do to the reactor?</description>
      <pubDate>Thu, 07 Jun 2007 05:07:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988353#M21044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-07T05:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: AcEditorReactor doesn't work if ACRX_CONS_DEFINE_MEMBE used</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988354#M21045</link>
      <description>Does your code call acrxBuildClassHierarchy() ?&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 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;GENWIND&gt; wrote in message news:5619042@discussion.autodesk.com...&lt;BR /&gt;
Yes. I "Clean" and "Rebuild All" and am sure I "Appload" the right .arx file. But the virtual methods still don't work if the macros are added.&lt;BR /&gt;
What do these macors do to the reactor?&lt;/GENWIND&gt;</description>
      <pubDate>Thu, 07 Jun 2007 08:44:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988354#M21045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-07T08:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: AcEditorReactor doesn't work if ACRX_CONS_DEFINE_MEMBE used</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988355#M21046</link>
      <description>Thanks, Tony. You are right.  After I added the following code to the kInitAppMsg case in acrxEntryPoint(...) method, things go right:&lt;BR /&gt;
AsdkEdEmployeeReactor::rxInit();&lt;BR /&gt;
acrxBuildClassHierarchy();&lt;BR /&gt;
&lt;BR /&gt;
I checked the AcRxDbxApp::On_kInitAppMsg(...) virtual method which is called by wizzard generated code in dbxEntryPoint.h file. Both the rxInit() and acrxBuildClassHierarchy() are called.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again for all your quick replies.</description>
      <pubDate>Fri, 08 Jun 2007 07:39:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/aceditorreactor-doesn-t-work-if-acrx-cons-define-membe-used/m-p/1988355#M21046</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-08T07:39:59Z</dc:date>
    </item>
  </channel>
</rss>

