<?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: Automatically starting add-on (notification handler) in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Automatically-starting-add-on-notification-handler/m-p/258652#M5540</link>
    <description>Great! Thanks Tibor. It is working &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Best Regards&lt;BR /&gt;
Lukasz</description>
    <pubDate>Mon, 13 Apr 2015 20:26:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-13T20:26:20Z</dc:date>
    <item>
      <title>[SOLVED] Automatically starting add-on(notification handler)</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Automatically-starting-add-on-notification-handler/m-p/258650#M5538</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi &lt;BR /&gt;&lt;BR /&gt;Is it possible to start add-on automatically?&lt;BR /&gt;&lt;BR /&gt;I want to use some events (APINotify_New, APINotify_Open, APINotify_Close).&lt;BR /&gt;&lt;BR /&gt;I've added
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;GSErrCode __ACENV_CALL	Initialize (void)
{
...
    GSErrCode err = ACAPI_Notify_CatchProjectEvent (API_AllProjectNotificationMask, NotificationHandler);

...
}
&lt;/PRE&gt;
on Initialize and I've added notification handler:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;static GSErrCode __ACENV_CALL    NotificationHandler (API_NotifyEventID notifID, Int32 param)
{
    switch (notifID) {
        case APINotify_New:
...
        case APINotify_Open:
...
    }
}
&lt;/PRE&gt;
Problem is with Initialize method, it isn't executed automatically after ArchiCAD starts.&lt;BR /&gt;If I add menu command handler, Iinitialize method will be executed on user's menu action (first time).&lt;BR /&gt;&lt;BR /&gt;Is it possible to run add-on automatically (start Notification handler) without user action?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Lukasz&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:16:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Automatically-starting-add-on-notification-handler/m-p/258650#M5538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T11:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically starting add-on (notification handler)</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Automatically-starting-add-on-notification-handler/m-p/258651#M5539</link>
      <description>Hi Lukasz, &lt;BR /&gt;
 
&lt;BLOCKQUOTE&gt;Lukasz wrote:&lt;BR /&gt;Problem is with Initialize method, it isn't executed automatically after ArchiCAD starts.&lt;/BLOCKQUOTE&gt; &lt;BR /&gt;
Please check the return type of your CheckEnvironment function! &lt;BR /&gt;
I think you should return APIAddon_Preload in CheckEnvironment function. That way Initialize method will be executed when ArchiCAD starts. &lt;BR /&gt;
Using ACAPI_KeepInMemory could be necessary also. &lt;BR /&gt;
 &lt;BR /&gt;
Regards, &lt;BR /&gt;
Tibor</description>
      <pubDate>Tue, 07 Apr 2015 14:17:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Automatically-starting-add-on-notification-handler/m-p/258651#M5539</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2015-04-07T14:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically starting add-on (notification handler)</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Automatically-starting-add-on-notification-handler/m-p/258652#M5540</link>
      <description>Great! Thanks Tibor. It is working &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Best Regards&lt;BR /&gt;
Lukasz</description>
      <pubDate>Mon, 13 Apr 2015 20:26:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Automatically-starting-add-on-notification-handler/m-p/258652#M5540</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-13T20:26:20Z</dc:date>
    </item>
  </channel>
</rss>

