<?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: Addon not loading in zero document state in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009095#M1482</link>
    <description>&lt;P&gt;I thought it's always called, how would you call acrxLockApplication, or acrxBuildClassHierarchy() and other functions?&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2024 12:37:22 GMT</pubDate>
    <dc:creator>daniel_cadext</dc:creator>
    <dc:date>2024-09-09T12:37:22Z</dc:date>
    <item>
      <title>Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/12206124#M1476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The .arx file not loading in startup when application started with zero document state. The same addon getting loaded on opening document. Is this AutoCAD behavior or any solution available.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 07:39:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/12206124#M1476</guid>
      <dc:creator>prakash.muthu</dc:creator>
      <dc:date>2023-08-30T07:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/12212707#M1477</link>
      <description>&lt;P&gt;In kInitAppMsg message you cannot use document as far as&amp;nbsp;&lt;EM&gt;AcApDocManager::curDocument() == 0&lt;/EM&gt; and &lt;EM&gt;acdbHostApplicationServices()-&amp;gt;workingDatabase() == 0&lt;/EM&gt;&amp;nbsp; in zero document state.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 18:23:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/12212707#M1477</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2023-09-01T18:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/12215794#M1478</link>
      <description>&lt;P&gt;The intension is not to use document in&amp;nbsp;&lt;SPAN&gt;kInitAppMsg. Just to load addon arx and linked dll's in application startup.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 05:07:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/12215794#M1478</guid>
      <dc:creator>prakash.muthu</dc:creator>
      <dc:date>2023-09-04T05:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009005#M1479</link>
      <description>&lt;P&gt;Still didn't get any solution for this problem. Is it AutoCAD restriction to load arx only when document in open. How about listening to app events without opening document.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 11:43:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009005#M1479</guid>
      <dc:creator>prakash.muthu</dc:creator>
      <dc:date>2024-09-09T11:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009044#M1480</link>
      <description>&lt;P&gt;You use acedRegisterOnIdleWinMsg in kInitAppMsg, do initialization,&lt;/P&gt;&lt;P&gt;then acedRemoveOnIdleWinMsg inside of&amp;nbsp;AcedOnIdleMsgFn if it’s not needed&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009044#M1480</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-09-09T12:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009076#M1481</link>
      <description>&lt;P&gt;&lt;SPAN&gt;kInitAppMsg not getting called when application starts with startup 2 and start mode 0. Its getting called on creating new document or opening disk file.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:25:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009076#M1481</guid>
      <dc:creator>prakash.muthu</dc:creator>
      <dc:date>2024-09-09T12:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009095#M1482</link>
      <description>&lt;P&gt;I thought it's always called, how would you call acrxLockApplication, or acrxBuildClassHierarchy() and other functions?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 12:37:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009095#M1482</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-09-09T12:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009140#M1483</link>
      <description>&lt;P&gt;Not using mentioned methods.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 13:00:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13009140#M1483</guid>
      <dc:creator>prakash.muthu</dc:creator>
      <dc:date>2024-09-09T13:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13010492#M1484</link>
      <description>&lt;P&gt;Pretty sure kInitAppMsg is always called, you’re just not seeing it. Try making a sample with this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;//-----------------------------------------------------------------------------
//----- acrxEntryPoint.cpp
//-----------------------------------------------------------------------------
#include "StdAfx.h"
#include "resource.h"

//----------------------------------------------------------------------------
#define szRDS _RXST("")

//-----------------------------------------------------------------------------
//----- ObjectARX EntryPoint
class ArxTemplate : public AcRxArxApp
{
public:
    ArxTemplate() : AcRxArxApp()
    {
    }

    virtual AcRx::AppRetCode On_kInitAppMsg(void* pkt)
    {
        AcRx::AppRetCode retCode = AcRxArxApp::On_kInitAppMsg(pkt);
        acedRegisterOnIdleWinMsg(OnIdle);
        return (retCode);
    }

    virtual AcRx::AppRetCode On_kUnloadAppMsg(void* pkt)
    {
        AcRx::AppRetCode retCode = AcRxArxApp::On_kUnloadAppMsg(pkt);
        acedRemoveOnIdleWinMsg(OnIdle);
        return (retCode);
    }

    virtual AcRx::AppRetCode On_kLoadDwgMsg(void* pkt) override
    {
        AcRx::AppRetCode retCode = AcRxDbxApp::On_kLoadDwgMsg(pkt);
        return retCode;
    }

    virtual void RegisterServerComponents()
    {
    }

    static void OnIdle()
    {
        static bool initOnce = false;
        if (!initOnce)
        {
            acedAlert(_T("\init once"));
            initOnce = true;
        }
    }

    static void ArxTemplate_doit(void)
    {

    }
};

//-----------------------------------------------------------------------------
#pragma warning( disable: 4838 ) //prevents a cast compiler warning, 
IMPLEMENT_ARX_ENTRYPOINT(ArxTemplate)
ACED_ARXCOMMAND_ENTRY_AUTO(ArxTemplate, ArxTemplate, _doit, doit, ACRX_CMD_TRANSPARENT, NULL)
#pragma warning( pop )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 Sep 2024 00:17:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13010492#M1484</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2024-09-10T00:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Addon not loading in zero document state</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13010796#M1485</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8575899"&gt;@daniel_cadext&lt;/a&gt;&amp;nbsp; for the code sample.&amp;nbsp;&lt;BR /&gt;We also using similar code. The problem is not with &lt;SPAN&gt;kInitAppMsg&lt;/SPAN&gt;. The arx file bundled in packagecontents not getting loaded when opening AutoCAD with startup 2. Same code getting called as mentioned in sample after opening a document. Maybe AutoCAD behavior to load addons when document in open.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 05:20:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/addon-not-loading-in-zero-document-state/m-p/13010796#M1485</guid>
      <dc:creator>prakash.muthu</dc:creator>
      <dc:date>2024-09-10T05:20:06Z</dc:date>
    </item>
  </channel>
</rss>

