<?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: APIDb_GetCurrentDatabaseID problem/bug? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11141#M6959</link>
    <description>&lt;BLOCKQUOTE&gt;adambutler wrote:&lt;BR /&gt;I'd like to know what database I just changed to without having to remember myself.
&lt;/BLOCKQUOTE&gt;
Adam,&lt;BR /&gt;
&lt;BR /&gt;
How about using APIDb_GetCurrentDatabaseID to tell you which one is active? E.g.
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	API_DatabaseInfo dbase;
	ACAPI_Database(APIDb_GetCurrentDatabaseID, &amp;amp;dbase, 0);
&lt;/PRE&gt;</description>
    <pubDate>Thu, 19 Jan 2006 21:58:06 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2006-01-19T21:58:06Z</dc:date>
    <item>
      <title>APIDb_GetCurrentDatabaseID problem/bug?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11140#M6957</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I cannot find out which section database I am using on the open notification. I get this problem in both ArchiCAD 9 and ArchiCAD 7.&lt;BR /&gt;&lt;BR /&gt;To replicate this problem I have a simple test. dbUnid and dbIndex are both set from a section that is in the drawing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;APIDatabaseInfo newDB;&lt;BR /&gt;&lt;BR /&gt;memset(&amp;amp;newDB, 0, sizeof(APIDatabaseInfo));&lt;BR /&gt;newDB.typeID = APIWindSectionID;&lt;BR /&gt;#if ACNINE&lt;BR /&gt;newDB.databaseUnId = dbUnid;&lt;BR /&gt;#else&lt;BR /&gt;newDb.index = dbIndex;&lt;BR /&gt;#endif&lt;BR /&gt;err = ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &amp;amp;newDB, nil);&lt;BR /&gt;&lt;BR /&gt;// can use the section database ok&lt;BR /&gt;&lt;BR /&gt;memset(&amp;amp;newDB, 0, sizeof(APIDatabaseInfo));&lt;BR /&gt;err = ACAPI_Database(APIDb_GetCurrentDatabaseID, &amp;amp;newDB, nil);&lt;BR /&gt;&lt;BR /&gt;// now I cannot get the current database. err == noErr, but...&lt;BR /&gt;// newDB.typeID == APIWindSectionID&lt;BR /&gt;// newDB.index == 0&lt;BR /&gt;// newDB.databaseUnId.id1 == 0&lt;BR /&gt;// newDB.databaseUnId.id2 == 0&lt;BR /&gt;&lt;BR /&gt;Is this a bug? I'd like to know what database I just changed to without having to remember myself.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Adam&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:31:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11140#M6957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-07T09:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: APIDb_GetCurrentDatabaseID problem/bug?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11141#M6959</link>
      <description>&lt;BLOCKQUOTE&gt;adambutler wrote:&lt;BR /&gt;I'd like to know what database I just changed to without having to remember myself.
&lt;/BLOCKQUOTE&gt;
Adam,&lt;BR /&gt;
&lt;BR /&gt;
How about using APIDb_GetCurrentDatabaseID to tell you which one is active? E.g.
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	API_DatabaseInfo dbase;
	ACAPI_Database(APIDb_GetCurrentDatabaseID, &amp;amp;dbase, 0);
&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jan 2006 21:58:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11141#M6959</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2006-01-19T21:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: APIDb_GetCurrentDatabaseID problem/bug?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11142#M6961</link>
      <description>My problem is with APIDb_GetCurrentDatabaseID. It tells me that its a section database but I cannot tell which section because the index/id's are zero.&lt;BR /&gt;
&lt;BR /&gt;
As a workaround I am now using a global variable to tell which database I last changed to.</description>
      <pubDate>Fri, 20 Jan 2006 02:37:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11142#M6961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-01-20T02:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: APIDb_GetCurrentDatabaseID problem/bug?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11143#M6963</link>
      <description>&lt;BLOCKQUOTE&gt;adambutler wrote:&lt;BR /&gt;My problem is with APIDb_GetCurrentDatabaseID. It tells me that its a section database but I cannot tell which section because the index/id's are zero.&lt;/BLOCKQUOTE&gt;

Oops - didn't read the question properly  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
I've checked the instances where I use APIDb_GetCurrentDatabaseID and I get non-zero values. Perhaps the results are dependent on the context in which the call is made?</description>
      <pubDate>Fri, 20 Jan 2006 09:56:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11143#M6963</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2006-01-20T09:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: APIDb_GetCurrentDatabaseID problem/bug?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11144#M6965</link>
      <description>Adam,&lt;BR /&gt;
&lt;BR /&gt;
I use "ACAPI_Automate (APIDo_ChangeWindowID, &amp;amp;windowInfo, NULL);" instead to change to a section/elevation window. It seems working ok.&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
&lt;BR /&gt;
Hoa</description>
      <pubDate>Thu, 23 Feb 2006 00:06:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIDb-GetCurrentDatabaseID-problem-bug/m-p/11144#M6965</guid>
      <dc:creator>Hoa Tu</dc:creator>
      <dc:date>2006-02-23T00:06:32Z</dc:date>
    </item>
  </channel>
</rss>

