<?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_Element_RefreshElement() doesn't work on AC27 in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608155#M9501</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's no need to call RefreshElement in this case; the element creation handles that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't work, you can try the other way around:&lt;/P&gt;
&lt;P&gt;- get original parameters from the library part (you may do that with `ACAPI_LibraryPart_GetParams()`, then you don't have to call OpenParameters/CloseParameters)&lt;/P&gt;
&lt;P&gt;- create the element with those default parameters&lt;/P&gt;
&lt;P&gt;- call ACAPI_LibraryPart_OpenParameters / ChangeAParameter / CloseParameters on the newly created object (fill the `guid` field instead of `libInd` in API_ParamOwnerType) → this ensures the parameter consistency&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2024 16:35:19 GMT</pubDate>
    <dc:creator>Akos Somorjai</dc:creator>
    <dc:date>2024-06-13T16:35:19Z</dc:date>
    <item>
      <title>ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/571723#M8758</link>
      <description>&lt;P&gt;blnForce = true;&lt;BR /&gt;err = ACAPI_Element_RefreshElement( &amp;amp;element.header, &amp;amp;blnForce);&lt;BR /&gt;//It worked on AC26 but not on AC27&lt;BR /&gt;//Please tell me how to deal with it&lt;/P&gt;
&lt;P&gt;//note)element is GDL with script&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 10:07:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/571723#M8758</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-05-31T10:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/578783#M8954</link>
      <description>&lt;P&gt;Additional notes)&lt;BR /&gt;If replaced with 'ACAPI_Element_SetElementURLRef()' one step above in ACAPI_Database.h, no error will occur.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 07:41:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/578783#M8954</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2023-12-04T07:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/580561#M9007</link>
      <description>&lt;P&gt;I forgot to mention something important.&lt;BR /&gt;It's a windows version.&lt;BR /&gt;API Development Kit 27.3001&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 17:02:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/580561#M9007</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2023-12-15T17:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/607730#M9489</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please update your AC27 to the latest version (27.2.1) and check it again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 03:39:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/607730#M9489</guid>
      <dc:creator>Hiromichi Shinkawa</dc:creator>
      <dc:date>2024-06-12T03:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608006#M9493</link>
      <description>&lt;P&gt;Archicad27 updated to version 27.2.1.&lt;BR /&gt;The error no longer occurs when calling up the function, but it is no longer functioning.&lt;/P&gt;&lt;P&gt;//bool force = true;&lt;BR /&gt;//err = ACAPI_Element_RefreshElement( &amp;amp;element.header, &amp;amp;force);&lt;/P&gt;&lt;P&gt;force = true : rebuild for GDL based elements (run parameter script).&lt;BR /&gt;is not work.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 03:06:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608006#M9493</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-06-13T03:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608042#M9495</link>
      <description>&lt;DIV&gt;The process to 'ACAPI_Element_RefreshElement'&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="cpp"&gt;API_Element element;
API_ElementMemo memo;
BNZeroMemory(&amp;amp;element, sizeof(API_Element));
BNZeroMemory(&amp;amp;memo, sizeof(API_ElementMemo));

element.header.type.typeID = API_ObjectID;
err = ACAPI_Element_GetDefaults(&amp;amp;element, &amp;amp;memo);

element.header.layer = Lind;
element.header.floorInd = Find;
element.object.libInd = LibIndex;
element.object.reflected = false;
element.object.pos = PosXY;
element.object.level = PosZ;
element.object.angle = 0;

API_ParamOwnerType paramOwner;
BNZeroMemory(&amp;amp;paramOwner, sizeof(API_ParamOwnerType));
paramOwner.libInd = LibIndex;
err = ACAPI_LibraryPart_OpenParameters( &amp;amp;paramOwner);
if (err == NoError) {
API_GetParamsType getParams;
BNZeroMemory(&amp;amp;getParams, sizeof(API_GetParamsType));
err = ACAPI_LibraryPart_GetActParameters(&amp;amp;getParams);
if (err == NoError) {
ACAPI_DisposeAddParHdl(&amp;amp;memo.params);
memo.params = getParams.params;
(*memo.params)[ParaIndex + 0].value.real = EndX;
(*memo.params)[ParaIndex + 1].value.real = EndY;
(*memo.params)[ParaIndex + 2].value.real = EndZ;
}
ACAPI_LibraryPart_CloseParameters();
}
err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);

bool blnForce = true;
err = ACAPI_Element_RefreshElement( &amp;amp;element.header, &amp;amp;blnForce);

ACAPI_DisposeElemMemoHdls(&amp;amp;memo);&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 00:41:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608042#M9495</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-06-19T00:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608155#M9501</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's no need to call RefreshElement in this case; the element creation handles that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't work, you can try the other way around:&lt;/P&gt;
&lt;P&gt;- get original parameters from the library part (you may do that with `ACAPI_LibraryPart_GetParams()`, then you don't have to call OpenParameters/CloseParameters)&lt;/P&gt;
&lt;P&gt;- create the element with those default parameters&lt;/P&gt;
&lt;P&gt;- call ACAPI_LibraryPart_OpenParameters / ChangeAParameter / CloseParameters on the newly created object (fill the `guid` field instead of `libInd` in API_ParamOwnerType) → this ensures the parameter consistency&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 16:35:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608155#M9501</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-06-13T16:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608248#M9504</link>
      <description>&lt;P&gt;Thank you for providing the workaround.&lt;BR /&gt;By the way, will the issue of "ACAPI_Element_RefreshElement()" not working properly in Archicad27 be fixed?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 04:13:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608248#M9504</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-06-14T04:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608261#M9506</link>
      <description>&lt;P&gt;My understanding is that this solution is not a workaround. You shouldn't need an extra parameter script call when you place an element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the source code, the function internally calls the parameter script with your parametrization, so I don't know what else to fix. Do you receive any errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 06:29:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608261#M9506</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-06-14T06:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608366#M9512</link>
      <description>&lt;P&gt;So the way the parameters were processed when creating the object was wrong in the first place.&lt;BR /&gt;I'll try reconstructing it.&lt;BR /&gt;If that doesn't work, I'll ask for your advice again.&lt;BR /&gt;note)&lt;BR /&gt;In the previous program,&lt;BR /&gt;In AC27.2.1, there is no error (NoError), but the GDL is not refreshed.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 17:25:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/608366#M9512</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-06-14T17:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/612671#M9564</link>
      <description>&lt;P&gt;Hi HKM!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure the parameter list after placing the element remains inconsistent?&lt;/P&gt;
&lt;P&gt;If you place the object on the GUI the parameters of the placed object are different comparing the object placed from the addon with the same default parameters?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you call the "Run Parameter Script on Placed Library Parts" menu command from the Library Developer menu, the object which is placed from the addon changes?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tamás&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 14:48:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/612671#M9564</guid>
      <dc:creator>MOREH Tamas</dc:creator>
      <dc:date>2024-06-26T14:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/614256#M9625</link>
      <description>&lt;P&gt;del&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 09:38:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/614256#M9625</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-07-05T09:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/614260#M9626</link>
      <description>&lt;P&gt;del&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 09:39:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/614260#M9626</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-07-05T09:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Element_RefreshElement() doesn't work on AC27</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/614269#M9627</link>
      <description>&lt;P&gt;I apologize.&lt;BR /&gt;The program I created for testing had a bug and was not working properly.&lt;BR /&gt;The title problem was solved in Version 27.2.1.&lt;BR /&gt;The "EndX", "EndY", and "EndZ" in the program source from the other day were fine in Version 27.2.1.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 09:36:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Element-RefreshElement-doesn-t-work-on-AC27/m-p/614269#M9627</guid>
      <dc:creator>HKM</dc:creator>
      <dc:date>2024-07-05T09:36:55Z</dc:date>
    </item>
  </channel>
</rss>

