<?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 APIERR_GENERAL Error in ACAPI_Element_Create in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-GENERAL-Error-in-ACAPI-Element-Create/m-p/251376#M2921</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi.&lt;BR /&gt;&lt;BR /&gt;I have some problem when I try to creating curtain wall.&lt;BR /&gt;&lt;BR /&gt;There is a curtain wall already created in archicad. (not using api)&lt;BR /&gt;&lt;BR /&gt;I get the curtain wall and try to create it in other layer, but ACAPI_Element_Create return APIERR_GENERAL.&lt;BR /&gt;&lt;BR /&gt;After get the curtain wall, I just change header.layer.&lt;BR /&gt;&lt;BR /&gt;API_Element element;&lt;BR /&gt;API_ElementMemo memo;&lt;BR /&gt;BNZeroMemory(&amp;amp;element, sizeof(API_Element));&lt;BR /&gt;BNZeroMemory(&amp;amp;memo, sizeof(API_ElementMemo));&lt;BR /&gt;element.header.guid = oriElemList[idx];&lt;BR /&gt;err = ACAPI_Element_Get(&amp;amp;element);&lt;BR /&gt;&lt;BR /&gt;if (element.header.hasMemo == true)&lt;BR /&gt;err = ACAPI_Element_GetMemo(element.header.guid, &amp;amp;memo);&lt;BR /&gt;&lt;BR /&gt;API_Attribute attrib;&lt;BR /&gt;BNZeroMemory(&amp;amp;attrib, sizeof(API_Attribute));&lt;BR /&gt;attrib.header.typeID = API_LayerID;&lt;BR /&gt;CHCopyC(trade.ToCStr(), attrib.header.name);&lt;BR /&gt;err = ACAPI_Attribute_Search(&amp;amp;attrib.header);&lt;BR /&gt;element.header.layer = attrib.header.index;&lt;BR /&gt;err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);&lt;BR /&gt;&lt;BR /&gt;err is GSErrCode&lt;BR /&gt;oriElemList is GS::Array&amp;lt;API_Guid&amp;gt;&lt;BR /&gt;trade is GS::UniString&lt;BR /&gt;&lt;BR /&gt;Is there anything that I have to do more?&lt;/DIV&gt;</description>
    <pubDate>Wed, 15 Sep 2021 09:49:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-15T09:49:33Z</dc:date>
    <item>
      <title>APIERR_GENERAL Error in ACAPI_Element_Create</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-GENERAL-Error-in-ACAPI-Element-Create/m-p/251376#M2921</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi.&lt;BR /&gt;&lt;BR /&gt;I have some problem when I try to creating curtain wall.&lt;BR /&gt;&lt;BR /&gt;There is a curtain wall already created in archicad. (not using api)&lt;BR /&gt;&lt;BR /&gt;I get the curtain wall and try to create it in other layer, but ACAPI_Element_Create return APIERR_GENERAL.&lt;BR /&gt;&lt;BR /&gt;After get the curtain wall, I just change header.layer.&lt;BR /&gt;&lt;BR /&gt;API_Element element;&lt;BR /&gt;API_ElementMemo memo;&lt;BR /&gt;BNZeroMemory(&amp;amp;element, sizeof(API_Element));&lt;BR /&gt;BNZeroMemory(&amp;amp;memo, sizeof(API_ElementMemo));&lt;BR /&gt;element.header.guid = oriElemList[idx];&lt;BR /&gt;err = ACAPI_Element_Get(&amp;amp;element);&lt;BR /&gt;&lt;BR /&gt;if (element.header.hasMemo == true)&lt;BR /&gt;err = ACAPI_Element_GetMemo(element.header.guid, &amp;amp;memo);&lt;BR /&gt;&lt;BR /&gt;API_Attribute attrib;&lt;BR /&gt;BNZeroMemory(&amp;amp;attrib, sizeof(API_Attribute));&lt;BR /&gt;attrib.header.typeID = API_LayerID;&lt;BR /&gt;CHCopyC(trade.ToCStr(), attrib.header.name);&lt;BR /&gt;err = ACAPI_Attribute_Search(&amp;amp;attrib.header);&lt;BR /&gt;element.header.layer = attrib.header.index;&lt;BR /&gt;err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);&lt;BR /&gt;&lt;BR /&gt;err is GSErrCode&lt;BR /&gt;oriElemList is GS::Array&amp;lt;API_Guid&amp;gt;&lt;BR /&gt;trade is GS::UniString&lt;BR /&gt;&lt;BR /&gt;Is there anything that I have to do more?&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 09:49:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIERR-GENERAL-Error-in-ACAPI-Element-Create/m-p/251376#M2921</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-15T09:49:33Z</dc:date>
    </item>
  </channel>
</rss>

