<?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: Window/Door Heigth/Width change in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-Door-Heigth-Width-change/m-p/272408#M3527</link>
    <description>&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;UpdateOneWindow &lt;/BLOCKQUOTE&gt;
Thanks, I have missed this one somehow and tried the version with markers based on Ext .&lt;BR /&gt;
&lt;BR /&gt;
So I assume that in case of changing Windows/Doors size and position there is no need to manipulate GDL properties and therefore memo of the element. Is that right?&lt;BR /&gt;
&lt;BR /&gt;
I end up with changing the GDL parameters because when I created a new window with changed W/H it ends up "detached from the opening" so element it didn't fit the opening. However when I opened Window settings and clicked OK window is updated and its fine. After your suggestion, I do create a new window and then I call Element_Chanege to "update" element and this works. Is there any other way to force AC to refresh without calling another element based operation?&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;verticalLink &lt;/BLOCKQUOTE&gt;
Thanks a lot. I figured out that Value is stored in lower parameter but could find linking props.&lt;BR /&gt;
&lt;BR /&gt;
I have one more question regarding EmptyOpenings.  In Window documentation, there is a statement that libind with value 0 creates an empty opening. But unfortunately, when I tried to Create such an object it works error that params are inconsistent. Shall it works ? in most cases EmptyOpening has own libind in Library anyway.</description>
    <pubDate>Wed, 26 Dec 2018 14:21:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-12-26T14:21:14Z</dc:date>
    <item>
      <title>Window/Door Heigth/Width change</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-Door-Heigth-Width-change/m-p/272406#M3525</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I would like to change w/h of an existing window or set up default tool with proper w/h. I thought it will be an easy thing. But it seem more tricky thing. &lt;BR /&gt;&lt;BR /&gt;Mostly I was trying to change API_OpeningBaseType parameters based on Do_ChangeElem form Element_test. But in the case of empty opening, it doesn't work. I case of Window it detaches opening from LibPart - there are two sets of points for opening and for LibPart. &lt;BR /&gt;&lt;BR /&gt;I was also trying to change GDL properties - A and B in particluar. But not much achieved here only errors about the inconsistency of data. &lt;BR /&gt;&lt;BR /&gt;So my question is which path is proper:&lt;BR /&gt;- change only opening data in element&lt;BR /&gt;- change GDL properties and opening elements&lt;BR /&gt;? &lt;BR /&gt;Are there any other parameters to change?&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Oct 2022 14:47:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Window-Door-Heigth-Width-change/m-p/272406#M3525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-04T14:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Window/Door Heigth/Width change</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-Door-Heigth-Width-change/m-p/272407#M3526</link>
      <description>&lt;BLOCKQUOTE&gt;kzaremba wrote:&lt;BR /&gt;Mostly I was trying to change API_OpeningBaseType parameters based on Do_ChangeElem form Element_test. But in the case of empty opening, it doesn't work.&lt;/BLOCKQUOTE&gt;
I've just checked it with this code (simplified version of UpdateOneWindow function from the Element_Test/Src/Element_Modify.cpp):
&lt;PRE&gt;static void     UpdateOneWindow (const API_Guid&amp;amp; guid)
{
    API_Element     element = {};
    API_Element     mask = {};
    GSErrCode       err;

    element.header.guid = guid;

    err = ACAPI_Element_Get (&amp;amp;element);

    if (err == NoError) {
        ACAPI_ELEMENT_MASK_CLEAR (mask);
        ACAPI_ELEMENT_MASK_SET (mask, API_WindowType, openingBase.width);
        ACAPI_ELEMENT_MASK_SET (mask, API_WindowType, openingBase.height);

        element.window.openingBase.width *= 2.0;
        element.window.openingBase.height += 0.2;

        err = ACAPI_Element_Change (&amp;amp;element, &amp;amp;mask, nullptr, 0, true);
    }
}&lt;/PRE&gt;
It worked for empty openings also.
&lt;BLOCKQUOTE&gt;kzaremba wrote:&lt;BR /&gt;Are there any other parameters to change?&lt;/BLOCKQUOTE&gt;
Yes, you should check the verticalLink field of the API_OpeningBaseType structure. The sill or header of the window/door can be linked to the top/bottom of the wall, so the distance can be fix.</description>
      <pubDate>Sat, 22 Dec 2018 20:12:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Window-Door-Heigth-Width-change/m-p/272407#M3526</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2018-12-22T20:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Window/Door Heigth/Width change</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-Door-Heigth-Width-change/m-p/272408#M3527</link>
      <description>&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;UpdateOneWindow &lt;/BLOCKQUOTE&gt;
Thanks, I have missed this one somehow and tried the version with markers based on Ext .&lt;BR /&gt;
&lt;BR /&gt;
So I assume that in case of changing Windows/Doors size and position there is no need to manipulate GDL properties and therefore memo of the element. Is that right?&lt;BR /&gt;
&lt;BR /&gt;
I end up with changing the GDL parameters because when I created a new window with changed W/H it ends up "detached from the opening" so element it didn't fit the opening. However when I opened Window settings and clicked OK window is updated and its fine. After your suggestion, I do create a new window and then I call Element_Chanege to "update" element and this works. Is there any other way to force AC to refresh without calling another element based operation?&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;verticalLink &lt;/BLOCKQUOTE&gt;
Thanks a lot. I figured out that Value is stored in lower parameter but could find linking props.&lt;BR /&gt;
&lt;BR /&gt;
I have one more question regarding EmptyOpenings.  In Window documentation, there is a statement that libind with value 0 creates an empty opening. But unfortunately, when I tried to Create such an object it works error that params are inconsistent. Shall it works ? in most cases EmptyOpening has own libind in Library anyway.</description>
      <pubDate>Wed, 26 Dec 2018 14:21:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Window-Door-Heigth-Width-change/m-p/272408#M3527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-26T14:21:14Z</dc:date>
    </item>
  </channel>
</rss>

