<?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 Window height and width problem in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-height-and-width-problem/m-p/276576#M5018</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hello there,&lt;BR /&gt;&lt;BR /&gt;I was trying to alter the width and height of a window using the corresponding parameters width and height of API_OpeningBaseType that each window/door/skylight elements have, and noticed that the window didn't updated its height or width. &lt;BR /&gt;&lt;BR /&gt;For the changes to effect on the window it required me to open the window options and click OK so the changes take effect.&lt;BR /&gt;&lt;BR /&gt;As a work-around, and to simulate the update, I thought of after creating the window calling Element_Change, without actually changing anything, but 'forcing' an update to the window, and it worked. The changes to width and height of the window were visible on the window.&lt;BR /&gt;&lt;BR /&gt;However, this function (ACAPI_Element_Change), as stated in the documentation only works on specific databases, "The current database should be the floor plan, a section/elevation, a detail or a worksheet". Alas, when I tried to create a window in a 3D view it gave me the corresponding error APIERR_BADDATABASE.&lt;BR /&gt;&lt;BR /&gt;Due to this, I was wondering two things:&lt;BR /&gt;&lt;BR /&gt;First, there is a way of correctly modifying the window's width and height without the need to call ACAPI_Element_Change. &lt;BR /&gt;&lt;BR /&gt;And second, if there is an operation that allows me to go from the 3DView to a story view. I tried using ACAPI_Environment(APIEnv_ChangeStorySettingsID, ...) with the command to change story, APIStory_GoTo, but it only worked when my view is already in a story (for example, when I change from story 1 to story 0), and it does not work when going from 3Dview to story.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance, &lt;BR /&gt;Xylios&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DoorBug.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/8085i4345973E27393316/image-size/large?v=v2&amp;amp;px=999" role="button" title="DoorBug.png" alt="DoorBug.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2023 19:09:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-12T19:09:42Z</dc:date>
    <item>
      <title>Window height and width problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-height-and-width-problem/m-p/276576#M5018</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello there,&lt;BR /&gt;&lt;BR /&gt;I was trying to alter the width and height of a window using the corresponding parameters width and height of API_OpeningBaseType that each window/door/skylight elements have, and noticed that the window didn't updated its height or width. &lt;BR /&gt;&lt;BR /&gt;For the changes to effect on the window it required me to open the window options and click OK so the changes take effect.&lt;BR /&gt;&lt;BR /&gt;As a work-around, and to simulate the update, I thought of after creating the window calling Element_Change, without actually changing anything, but 'forcing' an update to the window, and it worked. The changes to width and height of the window were visible on the window.&lt;BR /&gt;&lt;BR /&gt;However, this function (ACAPI_Element_Change), as stated in the documentation only works on specific databases, "The current database should be the floor plan, a section/elevation, a detail or a worksheet". Alas, when I tried to create a window in a 3D view it gave me the corresponding error APIERR_BADDATABASE.&lt;BR /&gt;&lt;BR /&gt;Due to this, I was wondering two things:&lt;BR /&gt;&lt;BR /&gt;First, there is a way of correctly modifying the window's width and height without the need to call ACAPI_Element_Change. &lt;BR /&gt;&lt;BR /&gt;And second, if there is an operation that allows me to go from the 3DView to a story view. I tried using ACAPI_Environment(APIEnv_ChangeStorySettingsID, ...) with the command to change story, APIStory_GoTo, but it only worked when my view is already in a story (for example, when I change from story 1 to story 0), and it does not work when going from 3Dview to story.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance, &lt;BR /&gt;Xylios&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DoorBug.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/8085i4345973E27393316/image-size/large?v=v2&amp;amp;px=999" role="button" title="DoorBug.png" alt="DoorBug.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 19:09:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Window-height-and-width-problem/m-p/276576#M5018</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-12T19:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Window height and width problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-height-and-width-problem/m-p/276577#M5019</link>
      <description>Look at:&lt;BR /&gt;
APIDb_GetCurrentDatabaseID&lt;BR /&gt;
APIDb_ChangeCurrentDatabaseID&lt;BR /&gt;
APIDo_ChangeWindowID&lt;BR /&gt;
&lt;BR /&gt;
Usual steps, if current database is not floor plan:
&lt;UL&gt;&lt;LI&gt;Keep current database ( APIDb_GetCurrentDatabaseID )&lt;BR /&gt;
Set floor plan database (ChangeCurrentDatabaseID )&lt;BR /&gt;
Do floor plan updates ( like ACAPI_Element_Change )&lt;BR /&gt;
Restore keeped database  (ChangeCurrentDatabaseID )&lt;/LI&gt;
&lt;/UL&gt;

Go to story and floor pan:
&lt;UL&gt;&lt;LI&gt;Activate floor plan window (APIDo_ChangeWindowID)&lt;BR /&gt;
Go to story (APIStory_GoTo)&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 15 Apr 2016 14:57:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Window-height-and-width-problem/m-p/276577#M5019</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2016-04-15T14:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Window height and width problem</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Window-height-and-width-problem/m-p/276578#M5020</link>
      <description>Hello, &lt;BR /&gt;
&lt;BR /&gt;
I tried following your advice and it works!&lt;BR /&gt;
&lt;BR /&gt;
Thank you for the reply,&lt;BR /&gt;
Xylios</description>
      <pubDate>Fri, 15 Apr 2016 18:01:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Window-height-and-width-problem/m-p/276578#M5020</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-15T18:01:34Z</dc:date>
    </item>
  </channel>
</rss>

