<?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: ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/674883#M10536</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/20431"&gt;@PetteriHeiskari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One (very rough) workaround idea would be to store the grid information whenever you are in the floorplan and then use the stored value when you are not in the floorplan.&amp;nbsp;Not sure if it even works, because I'd have to first try to see if updating grid information even gives you some project event to listen to with the notification manager.&lt;/P&gt;
&lt;P&gt;Maybe you can also hook into the change window notification, might be worth checking out if the grid returned is still the floorplan grid during the switch form 2D -&amp;gt; 3D windows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just a few ideas in case it may help.&lt;/P&gt;
&lt;P&gt;Bernd&lt;/P&gt;</description>
    <pubDate>Thu, 28 Aug 2025 08:59:10 GMT</pubDate>
    <dc:creator>BerndSchwarzenbacher</dc:creator>
    <dc:date>2025-08-28T08:59:10Z</dc:date>
    <item>
      <title>ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/669817#M10498</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to use floor plan grid even if user has 3D window active. So I am using this scenario:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="cpp"&gt;// To 2D

API_DatabaseInfo rDb;
GSErrCode err;

memset( &amp;amp;rDb, 0, sizeof(rDb) );
rDb.typeID = APIWind_FloorPlanID;
err = ACAPI_Database_ChangeCurrentDatabase(&amp;amp;rDb);    // err is 0

// Query the grid - still gives what is set in 3D window
API_GridType grid;

ACAPI_Window_GetGridSettings( &amp;amp;grid);&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;I have a customer report that this used to work in all earlier Archicads and in AC28 before update 5000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any tips how to get the floor plan grid? Or is this a bug to be fixed in AC29 and coming updates to AC28?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Petteri&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 15:53:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/669817#M10498</guid>
      <dc:creator>PetteriHeiskari</dc:creator>
      <dc:date>2025-07-16T15:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/672116#M10520</link>
      <description>&lt;P&gt;Hi, the grid setting depends on current window in current AC versions, so if you need to get floor plan grid values, you can try switch to floor plan using ACAPI_Window_ChangeWindow() at once and get it, then call again back to 3D window.&lt;/P&gt;
&lt;P&gt;HTH.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2025 06:32:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/672116#M10520</guid>
      <dc:creator>Hiromichi Shinkawa</dc:creator>
      <dc:date>2025-08-05T06:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/672506#M10521</link>
      <description>&lt;P&gt;Thank you Chen,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;actually something like this is already used but after AC28/5000 it started to report the active window's grid:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;LI-CODE lang="cpp"&gt;API_DatabaseInfo rDb;
GSErrCode err;

memset( &amp;amp;rDb, 0, sizeof(rDb) );
rDb.typeID = APIWind_FloorPlanID;

err = ACAPI_Database_ChangeCurrentDatabase(&amp;amp;rDb);
assert( !err );

API_GridType m_grid;

ACAPI_Window_GetGridSettings( &amp;amp;m_grid ); // Still gives 3D grid&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Petteri&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Aug 2025 12:00:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/672506#M10521</guid>
      <dc:creator>PetteriHeiskari</dc:creator>
      <dc:date>2025-08-28T12:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/672507#M10522</link>
      <description>&lt;P&gt;Ah sorry, you meant &lt;SPAN&gt;ACAPI_Window_ChangeWindow(). That is something I would not like to do since it really puts the 2D window to front and may cause delay/updating problems afterwards. So any chance to get it work just by changing the active DB like earlier?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Petteri&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 12:26:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/672507#M10522</guid>
      <dc:creator>PetteriHeiskari</dc:creator>
      <dc:date>2025-08-07T12:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/674883#M10536</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/20431"&gt;@PetteriHeiskari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One (very rough) workaround idea would be to store the grid information whenever you are in the floorplan and then use the stored value when you are not in the floorplan.&amp;nbsp;Not sure if it even works, because I'd have to first try to see if updating grid information even gives you some project event to listen to with the notification manager.&lt;/P&gt;
&lt;P&gt;Maybe you can also hook into the change window notification, might be worth checking out if the grid returned is still the floorplan grid during the switch form 2D -&amp;gt; 3D windows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just a few ideas in case it may help.&lt;/P&gt;
&lt;P&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 08:59:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/674883#M10536</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2025-08-28T08:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/675048#M10537</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;SPAN&gt;Bernd,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;tried in the project event handler and the call fails with err code APIERR_BADDATABASE when switching to 3D-window:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;case APINotify_ChangeWindow:
{
  CAcadGrid grid;
  grFrameSettings.AddMessageFormat(NULL, "grid x=%f", grid.m_grid.spaceMainX);
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then another workaround would be to use DG's PanelIdle-event and save the 2D grid there. However, it is unreliable. For example, if a pln-file is opened 3D window being active, the 2D grid cannot be retrieved at all before needing it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Petteri&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 16:54:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/675048#M10537</guid>
      <dc:creator>PetteriHeiskari</dc:creator>
      <dc:date>2025-09-02T16:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Window_GetGridSettings() gives 3D grid even if switched to floor plan DB</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/675432#M10540</link>
      <description>&lt;P&gt;OK. Too bad that doesn't work....&lt;/P&gt;
&lt;P&gt;I tried a bit myself and I even get an error when requesting the grid in a 3D window. When switching to the 2D database, then the grid request works. But then I get the 3D grid as you've also reported. (AC28 INT 5200).&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 10:49:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Window-GetGridSettings-gives-3D-grid-even-if-switched-to/m-p/675432#M10540</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2025-09-02T10:49:17Z</dc:date>
    </item>
  </channel>
</rss>

