<?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: I want to put the ID value in C++ while creating Beam. in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393407#M996</link>
    <description>&lt;P&gt;Is this what you need: ACAPI_Database(APIDb_ChangeElementInfoStringID, ...)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2023 03:36:01 GMT</pubDate>
    <dc:creator>ReignBough</dc:creator>
    <dc:date>2023-07-26T03:36:01Z</dc:date>
    <item>
      <title>I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393342#M995</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeeJaeYoung_0-1690293520091.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/43986i74540EA99E6FFC1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeeJaeYoung_0-1690293520091.png" alt="LeeJaeYoung_0-1690293520091.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to put the id value in C++ while creating Beam.&lt;BR /&gt;What should I do?&lt;BR /&gt;I created it by looking at the create element_test code.&lt;/P&gt;
&lt;P&gt;What can I study?&lt;BR /&gt;I'm a beginner who can understand if you give me the code. ^^&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;&lt;A href="https://community.graphisoft.com/t5/Developer-forum/Get-element-s-ID/m-p/369035" target="_blank"&gt;Solved: Get element's ID - Graphisoft Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 14:06:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393342#M995</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-07-25T14:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393407#M996</link>
      <description>&lt;P&gt;Is this what you need: ACAPI_Database(APIDb_ChangeElementInfoStringID, ...)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 03:36:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393407#M996</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2023-07-26T03:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393429#M997</link>
      <description>&lt;DIV&gt;&lt;FONT&gt;&lt;FONT&gt;GSErrCode ACAPI_Database(APIDb_ChangeElementInfoStringID,&lt;EM&gt;&lt;STRONG&gt;element&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT&gt;.header.guid, "ABC111");&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT&gt;err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT&gt;if (err != NoError) {&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT&gt;ACAPI_WriteReport("ACAPI_Element_Create (Beam) has failed with error code %ld!", true, err);&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;}&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeeJaeYoung_0-1690358299678.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44030iBA163D65DEC037A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeeJaeYoung_0-1690358299678.png" alt="LeeJaeYoung_0-1690358299678.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a beginner so I don't understand because I don't have the code.&lt;BR /&gt;I need a code that can change the ID value.&lt;/P&gt;
&lt;P&gt;1. I'm curious whether it's before or after creation and why the error occurs. ^^&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeeJaeYoung_0-1690359597337.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44031i631503F5494F52F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeeJaeYoung_0-1690359597337.png" alt="LeeJaeYoung_0-1690359597337.png" /&gt;&lt;/span&gt;
&lt;P&gt;1.&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt; err = ACAPI_Database(APIDb_ChangeElementInfoStringID, &amp;amp;element.header.guid, "xx");&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if (err != NoError) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; ACAPI_WriteReport("ACAPI_Element_Create (Beam) has failed with error code %ld!", true, err);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; return;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if (err != NoError) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; ACAPI_WriteReport("ACAPI_Element_Create (Beam) has failed with error code %ld!", true, err);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;2.&amp;nbsp;&amp;nbsp;archicad is dead&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;&lt;SPAN&gt; err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if (err != NoError) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; ACAPI_WriteReport("ACAPI_Element_Create (Beam) has failed with error code %ld!", true, err);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;err = ACAPI_Database(APIDb_ChangeElementInfoStringID, &amp;amp;element.header.guid, "xx");&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if (err != NoError) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; ACAPI_WriteReport("ACAPI_Element_Create (Beam) has failed with error code %ld!", true, err);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; return;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jul 2023 08:21:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393429#M997</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-07-26T08:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393473#M998</link>
      <description>&lt;P&gt;You need to call your routines inside&amp;nbsp;&lt;SPAN&gt;ACAPI_CallUndoableCommand()&amp;nbsp; block.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 13:30:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393473#M998</guid>
      <dc:creator>Miha Nahtigal</dc:creator>
      <dc:date>2023-07-26T13:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393479#M999</link>
      <description>&lt;P&gt;&amp;nbsp;err = ACAPI_CallUndoableCommand("Create Beam",&lt;BR /&gt;[&amp;amp;]() -&amp;gt; GSErrCode {&lt;BR /&gt;return ACAPI_Database(APIDb_ChangeElementInfoStringID, &amp;amp;element.header.guid, "xx");&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeeJaeYoung_0-1690381331525.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/44043i77350C46CCBEE1AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeeJaeYoung_0-1690381331525.png" alt="LeeJaeYoung_0-1690381331525.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The id value did not change to "XX".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;err = ACAPI_CallUndoableCommand("Create Beam",&lt;BR /&gt;[&amp;amp;]() -&amp;gt; GSErrCode {&lt;BR /&gt;return ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following error occurs.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 14:26:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393479#M999</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-07-26T14:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393543#M1000</link>
      <description>&lt;P&gt;thank you so much. ^^&lt;/P&gt;
&lt;P&gt;I understand now. ^^&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 03:54:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/393543#M1000</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-07-27T03:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401133#M8650</link>
      <description>&lt;P&gt;&lt;SPAN&gt; err = ACAPI_Database(APIDb_ChangeElementInfoStringID, &amp;amp;element.header.guid, &amp;amp;na);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="스크린샷 2023-10-06 131651.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/46891iBF540280DBFD9878/image-size/medium?v=v2&amp;amp;px=400" role="button" title="스크린샷 2023-10-06 131651.png" alt="스크린샷 2023-10-06 131651.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;ACAPI_Database not found in archicad 27 api&lt;BR /&gt;There is also no content in ACAPinc.h.&lt;BR /&gt;What should I study?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I don't have apidevkit.chm, where should I search for it?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 04:20:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401133#M8650</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-10-06T04:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401264#M8659</link>
      <description>&lt;P&gt;Check migration documentation and ACAPI_MigrationHeader.hpp inside Support\Inc folder&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;ACAPI_Element_ChangeElementInfoString() instead of&amp;nbsp;&lt;SPAN&gt;ACAPI_Database(APIDb_ChangeElementInfoStringID...)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 16:46:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401264#M8659</guid>
      <dc:creator>Miha Nahtigal</dc:creator>
      <dc:date>2023-10-06T16:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401294#M8661</link>
      <description>&lt;P&gt;Thank you for your advice.^^&lt;/P&gt;
&lt;P&gt;Have a happy weekend.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2023 01:20:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401294#M8661</guid>
      <dc:creator>LeeJaeYoung</dc:creator>
      <dc:date>2023-10-07T01:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: I want to put the ID value in C++ while creating Beam.</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401732#M8681</link>
      <description>&lt;P&gt;When functions/structures were changed in SDK (and we used them), we put them in a function wrapper to call the proper functions/structure member. Especially, when we support the lower versions of ArchiCAD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;GSErrCode Db_ChangeElementInfoString(API_Guid* guid, GS::UniString* id)
{&lt;BR /&gt;    if (ARCHICAD_VER &amp;gt;= 27)&lt;BR /&gt;         return ACAPI_Element_ChangeElementInfoString(guid, id);
    else if (ARCHICAD_VER &amp;lt; 27 &amp;amp;&amp;amp; ARCHICAD_VER &amp;gt;= 23)
        return ACAPI_Database(APIDb_ChangeElementInfoStringID, guid, id);
    else //if (ARCHICAD_VER &amp;lt; 23)&lt;BR /&gt;        return APIERR_NOTSUPPORTED;
    //return NoError;
}&lt;BR /&gt;&lt;BR /&gt;void Elem_SetElemType(API_Elemennt&amp;amp; elem, API_ElemTypeID typeId)&lt;BR /&gt;{&lt;BR /&gt;    if (ARCHICAD_VER &amp;gt;= 26)&lt;BR /&gt;        elem.header.type.typeID = typeID;&lt;BR /&gt;    else //if (ARCHICAD_VER &amp;lt; 26)&lt;BR /&gt;        elem.header.typeId = typeID;&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;CODE&gt;ARCHICAD_VER&lt;/CODE&gt; is then defined in Project Property's Preprocessor.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 06:32:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/I-want-to-put-the-ID-value-in-C-while-creating-Beam/m-p/401732#M8681</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2023-10-10T06:32:37Z</dc:date>
    </item>
  </channel>
</rss>

