<?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: Persisting GS::Array&amp;lt;API_Neig&amp;gt; between SelectionChangeHandlerProc and ProjectEventHandlerP in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Persisting-GS-Array-lt-API-Neig-gt-between/m-p/693223#M10784</link>
    <description>&lt;P&gt;&lt;STRIKE&gt;Thank you for your suggestion regarding ACAPI_KeepInMemory(true). I tried implementing it, but the data only persists within one Database. As soon as I switch to another window (e.g., from floor plan to section), the data in the array gets cleared.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;Could you please advise on the correct approach?&lt;/STRIKE&gt;&lt;STRIKE&gt;&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;I found a bug in my code — everything works perfectly now! Thank you so much for the helpful suggestion!&lt;/P&gt;</description>
    <pubDate>Tue, 17 Feb 2026 08:32:39 GMT</pubDate>
    <dc:creator>kuvbur</dc:creator>
    <dc:date>2026-02-17T08:32:39Z</dc:date>
    <item>
      <title>Persisting GS::Array&lt;API_Neig&gt; between SelectionChangeHandlerProc and ProjectEventHandlerProc</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Persisting-GS-Array-lt-API-Neig-gt-between/m-p/692304#M10772</link>
      <description>&lt;P&gt;How to persist GS::Array&amp;lt;API_Neig&amp;gt; between SelectionChangeHandlerProc and ProjectEventHandlerProc in ArchiCAD add-on? I want to save selection when switching windows (floor plans/sections). In SelectionChangeHandlerProc I capture selection with ACAPI_Selection_Get() into GS::Array&amp;lt;API_Neig&amp;gt;, then in ProjectEventHandlerProc catch APINotify_ChangeWindow/ChangeFloor/ChangeProjectDB and restore with ACAPI_Element_Select(). Problem: can't reliably pass array between callbacks. Tried global variables, static locals, singleton — all fail between invocations. What's the standard way to share data between ArchiCAD notifier callbacks?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Feb 2026 18:25:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Persisting-GS-Array-lt-API-Neig-gt-between/m-p/692304#M10772</guid>
      <dc:creator>kuvbur</dc:creator>
      <dc:date>2026-02-07T18:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Persisting GS::Array&lt;API_Neig&gt; between SelectionChangeHandlerProc and ProjectEventHandlerP</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Persisting-GS-Array-lt-API-Neig-gt-between/m-p/692648#M10775</link>
      <description>&lt;P&gt;I suggest taking a look at the API call &amp;nbsp;&lt;EM&gt;ACAPI_KeepInMemory&lt;/EM&gt;. Add-ons are unloaded from memory when not in use by default, which means they lose all variable data between one call and the next. But if you call&amp;nbsp;&lt;EM&gt;ACAPI_KeepInMemory(true)&lt;/EM&gt; you ask Archicad to persist the add-on in memory for the entire session, which means variable contents also persists between calls&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 10:21:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Persisting-GS-Array-lt-API-Neig-gt-between/m-p/692648#M10775</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2026-02-11T10:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Persisting GS::Array&lt;API_Neig&gt; between SelectionChangeHandlerProc and ProjectEventHandlerP</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Persisting-GS-Array-lt-API-Neig-gt-between/m-p/693223#M10784</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;Thank you for your suggestion regarding ACAPI_KeepInMemory(true). I tried implementing it, but the data only persists within one Database. As soon as I switch to another window (e.g., from floor plan to section), the data in the array gets cleared.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;Could you please advise on the correct approach?&lt;/STRIKE&gt;&lt;STRIKE&gt;&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;I found a bug in my code — everything works perfectly now! Thank you so much for the helpful suggestion!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 08:32:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Persisting-GS-Array-lt-API-Neig-gt-between/m-p/693223#M10784</guid>
      <dc:creator>kuvbur</dc:creator>
      <dc:date>2026-02-17T08:32:39Z</dc:date>
    </item>
  </channel>
</rss>

