<?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: Cannot set properties of curtain walls in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Cannot-set-properties-of-curtain-walls/m-p/270374#M3512</link>
    <description>Hi Dan,&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_Element_GetPropertyValues returns those expression based properties also which cannot be evaluated for the element (isEvaluated is false). ACAPI_Element_SetProperties/ACAPI_Element_SetProperty functions do not allow to set not evaluable properties, that's why you got APIERR_BADPARS error.&lt;BR /&gt;
If you filter out those not evaluable properties, then it will work (see example code below).&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_Element_GetPropertyDefinitions returns the read-only property definitions also (canValueBeEditable is false). If you try to set those read-only properties using ACAPI_Element_SetProperties/ACAPI_Element_SetProperty, then you will get APIERR_READONLY error.&lt;BR /&gt;
&lt;BR /&gt;
You can easily filter out the non editable and not evaluable properties like this:
&lt;PRE&gt;for (UIndex ii = properties.GetSize (); ii &amp;gt;= 1; --ii) {
	const API_Property&amp;amp; p = properties.Get (ii - 1);
	if (p.definition.canValueBeEditable == false || p.isEvaluated == false)
		properties.Delete (ii - 1);
}

ACAPI_Element_SetProperties (guid, properties);&lt;/PRE&gt;

&lt;BR /&gt;
Best Regards,&lt;BR /&gt;
Tibor</description>
    <pubDate>Sat, 15 Dec 2018 08:50:40 GMT</pubDate>
    <dc:creator>Tibor Lorantfy</dc:creator>
    <dc:date>2018-12-15T08:50:40Z</dc:date>
    <item>
      <title>Cannot set properties of curtain walls</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Cannot-set-properties-of-curtain-walls/m-p/270372#M3510</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello Archicad community,&lt;BR /&gt;&lt;BR /&gt;For some reason I cannot successfully set properties for curtain wall elements (error code: -2130313112, "The passed parameters are inconsistent." according to &lt;A href="http://archicadapi.Graphisoft.com/documentation/error-codes" target="_blank" rel="noopener"&gt;http://archicadapi.Graphisoft.com/documentation/error-codes&lt;/A&gt;)&lt;BR /&gt;&lt;BR /&gt;It is not a problem for GUIDs of windows, doors, etc. but curtain walls always produce this error code. I am aware that the curtain wall is a composite element, however, shouldn't the property values be attached to a curtain wall element in the same way as a window for example?&lt;BR /&gt;&lt;BR /&gt;Here is the simplified code I am using:&lt;BR /&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;GS::Array&amp;lt;API_PropertyDefinition&amp;gt; propertyDefinitions;
GS::Array&amp;lt;API_Property&amp;gt; properties;

ACAPI_Element_GetPropertyDefinitions(guid, API_PropertyDefinitionFilter_UserDefined, propertyDefinitions);
ACAPI_Element_GetPropertyValues(guid, propertyDefinitions, properties);

ACAPI_Element_SetProperties(guid, properties)
&lt;/PRE&gt;
In the real code I modify the property values before writing them again, however even untouched (read properties, write properties) I get this error. For getting the property definitions and values I do not get any error with a curtain wall.&lt;BR /&gt;&lt;BR /&gt;Also I already confirmed that the GUID is really the one of the facade/curtain wall element itself, by printing the ElementID of its property.&lt;BR /&gt;&lt;BR /&gt;Thanks for any help in advance!&lt;BR /&gt;- Dan&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Oct 2022 14:48:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Cannot-set-properties-of-curtain-walls/m-p/270372#M3510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-04T14:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot set properties of curtain walls</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Cannot-set-properties-of-curtain-walls/m-p/270373#M3511</link>
      <description>I haven't tried this particular add. But in my case adding value works for Panels inside CW.. In my case I'm using ACAPI_​Element_​SetProperty. Maybe try this one to test if it's working for one Prop.</description>
      <pubDate>Fri, 14 Dec 2018 13:46:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Cannot-set-properties-of-curtain-walls/m-p/270373#M3511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-14T13:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot set properties of curtain walls</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Cannot-set-properties-of-curtain-walls/m-p/270374#M3512</link>
      <description>Hi Dan,&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_Element_GetPropertyValues returns those expression based properties also which cannot be evaluated for the element (isEvaluated is false). ACAPI_Element_SetProperties/ACAPI_Element_SetProperty functions do not allow to set not evaluable properties, that's why you got APIERR_BADPARS error.&lt;BR /&gt;
If you filter out those not evaluable properties, then it will work (see example code below).&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_Element_GetPropertyDefinitions returns the read-only property definitions also (canValueBeEditable is false). If you try to set those read-only properties using ACAPI_Element_SetProperties/ACAPI_Element_SetProperty, then you will get APIERR_READONLY error.&lt;BR /&gt;
&lt;BR /&gt;
You can easily filter out the non editable and not evaluable properties like this:
&lt;PRE&gt;for (UIndex ii = properties.GetSize (); ii &amp;gt;= 1; --ii) {
	const API_Property&amp;amp; p = properties.Get (ii - 1);
	if (p.definition.canValueBeEditable == false || p.isEvaluated == false)
		properties.Delete (ii - 1);
}

ACAPI_Element_SetProperties (guid, properties);&lt;/PRE&gt;

&lt;BR /&gt;
Best Regards,&lt;BR /&gt;
Tibor</description>
      <pubDate>Sat, 15 Dec 2018 08:50:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Cannot-set-properties-of-curtain-walls/m-p/270374#M3512</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2018-12-15T08:50:40Z</dc:date>
    </item>
  </channel>
</rss>

