<?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 How to edit parameters of the element on the scene in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-edit-parameters-of-the-element-on-the-scene/m-p/225691#M2757</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Seems like this piece of code is getting lights from the scene correctly, but the values are not saved into objects. What else am I supposed to do in order to change parameters on the element? &lt;BR /&gt;Thanks for the help.&lt;BR /&gt;
&lt;PRE&gt; 
GS::Array&amp;lt;API_Guid&amp;gt; elemList;
        ACAPI_Element_GetElemList(API_LampID, &amp;amp;elemList, APIFilt_OnActFloor, APIVarId_Light, APINULLGuid);
        for (const auto&amp;amp; e : elemList) {
            API_Element element;
            BNZeroMemory(&amp;amp;element, sizeof(API_Element));
            element.header.guid = e;
            if (ACAPI_Element_Get(&amp;amp;element, 0) == NoError) {
                element.lamp.lightColor = API_RGBColor{ 1.f, 0.f, 0.f };
                element.lamp.lightIsOn  = true;
            }
        }
&lt;/PRE&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 15 Sep 2021 10:38:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-15T10:38:14Z</dc:date>
    <item>
      <title>How to edit parameters of the element on the scene</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-edit-parameters-of-the-element-on-the-scene/m-p/225691#M2757</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Seems like this piece of code is getting lights from the scene correctly, but the values are not saved into objects. What else am I supposed to do in order to change parameters on the element? &lt;BR /&gt;Thanks for the help.&lt;BR /&gt;
&lt;PRE&gt; 
GS::Array&amp;lt;API_Guid&amp;gt; elemList;
        ACAPI_Element_GetElemList(API_LampID, &amp;amp;elemList, APIFilt_OnActFloor, APIVarId_Light, APINULLGuid);
        for (const auto&amp;amp; e : elemList) {
            API_Element element;
            BNZeroMemory(&amp;amp;element, sizeof(API_Element));
            element.header.guid = e;
            if (ACAPI_Element_Get(&amp;amp;element, 0) == NoError) {
                element.lamp.lightColor = API_RGBColor{ 1.f, 0.f, 0.f };
                element.lamp.lightIsOn  = true;
            }
        }
&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 10:38:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-edit-parameters-of-the-element-on-the-scene/m-p/225691#M2757</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-15T10:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit parameters of the element on the scene</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-edit-parameters-of-the-element-on-the-scene/m-p/225692#M2758</link>
      <description>Use &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Element_Change&lt;E&gt;&lt;/E&gt; to write the change back to the database.</description>
      <pubDate>Sat, 07 Mar 2020 17:46:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-edit-parameters-of-the-element-on-the-scene/m-p/225692#M2758</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-03-07T17:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit parameters of the element on the scene</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-edit-parameters-of-the-element-on-the-scene/m-p/225693#M2759</link>
      <description>Thanks! To make this post more helpful, you have to wrap the actual element changing logic into &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_CallUndoableCommand&lt;E&gt;&lt;/E&gt; because in another case you get&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt; APIERR_NEEDSUNDOSCOPE&lt;E&gt;&lt;/E&gt; and no changes will occur.</description>
      <pubDate>Mon, 09 Mar 2020 10:24:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-edit-parameters-of-the-element-on-the-scene/m-p/225693#M2759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-09T10:24:49Z</dc:date>
    </item>
  </channel>
</rss>

