<?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: Expression Based Properties in AC 27 API in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604040#M9374</link>
    <description>&lt;P&gt;Hello? Is there any update or alternative please?&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 14:03:54 GMT</pubDate>
    <dc:creator>Apollos</dc:creator>
    <dc:date>2024-05-16T14:03:54Z</dc:date>
    <item>
      <title>Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603680#M9366</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;Please I need your assistance, I have been trying to write an expression for my Properties through the Archicad 27 C++ API, to sum two variables from the zone element. but I am yet to get the correct syntax. Please, any meaningful advice will be appreciated. Find below the code block snippet. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;//// Create expression property definitions for Area With Niches
API_PropertyDefinition expressionAreaWithNiches;
expressionAreaWithNiches.guid = APINULLGuid;
expressionAreaWithNiches.groupGuid = group.guid;
expressionAreaWithNiches.name = "Expression Area With Niches";
expressionAreaWithNiches.description = "This is the Room Area with recesses or niches";
expressionAreaWithNiches.collectionType = API_PropertySingleCollectionType;
expressionAreaWithNiches.valueType = API_PropertyRealValueType;
expressionAreaWithNiches.measureType = API_PropertyAreaMeasureType;
expressionAreaWithNiches.definitionType = API_PropertyCustomDefinitionType;
expressionAreaWithNiches.defaultValue.hasExpression = true;
expressionAreaWithNiches.defaultValue.propertyExpressions = {"SUM"{ "Measured Area", "Wall Inset Top Surface"} };

err = ACAPI_Property_CreatePropertyDefinition(expressionAreaWithNiches);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 May 2024 15:12:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603680#M9366</guid>
      <dc:creator>Apollos</dc:creator>
      <dc:date>2024-05-14T15:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603818#M9369</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;expressionAreaWithNiches.defaultValue.propertyExpressions = {"SUM ( {Property:2FEF2535-7688-4A26-A0C8-2E892CBDCFD8}, {Property:D53B1F63-5552-47FB-BD5B-FB1F57FEACEA} )"};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Akos&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 09:55:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603818#M9369</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-05-15T09:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603831#M9370</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;, thank you for your response. I just tried it but it compiled without errors but it did not execute its task. Please, is this the expression property string GUIDS or what? Please. I await your feedback.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 11:09:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603831#M9370</guid>
      <dc:creator>Apollos</dc:creator>
      <dc:date>2024-05-15T11:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603833#M9371</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, they are. You can try to get the GUIDs if you create the same property in the Property Manager, then export it as an XML file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 11:15:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603833#M9371</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-05-15T11:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603834#M9372</link>
      <description>&lt;P&gt;OK. I will do that NOW... I will get back to you.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 11:17:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603834#M9372</guid>
      <dc:creator>Apollos</dc:creator>
      <dc:date>2024-05-15T11:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603839#M9373</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;, I just tried it but it does not work. Or am I missing something? I really want to understand the expression syntax.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 11:34:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/603839#M9373</guid>
      <dc:creator>Apollos</dc:creator>
      <dc:date>2024-05-15T11:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604040#M9374</link>
      <description>&lt;P&gt;Hello? Is there any update or alternative please?&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 14:03:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604040#M9374</guid>
      <dc:creator>Apollos</dc:creator>
      <dc:date>2024-05-16T14:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604042#M9375</link>
      <description>&lt;P&gt;I played around and was able to figure out a working example. This code works for me (AC27):&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;API_PropertyDefinition expressionAreaWithNiches{};
expressionAreaWithNiches.guid = APINULLGuid;
expressionAreaWithNiches.groupGuid = group.guid;
expressionAreaWithNiches.name = "Expression Area With Niches";
expressionAreaWithNiches.description = "This is the Room Area with recesses or niches";
expressionAreaWithNiches.collectionType = API_PropertySingleCollectionType;
expressionAreaWithNiches.valueType = API_PropertyRealValueType;
expressionAreaWithNiches.measureType = API_PropertyAreaMeasureType;
expressionAreaWithNiches.definitionType = API_PropertyCustomDefinitionType;
expressionAreaWithNiches.canValueBeEditable = true;
expressionAreaWithNiches.defaultValue.basicValue.singleVariant.variant.type = expressionAreaWithNiches.valueType;
expressionAreaWithNiches.defaultValue.hasExpression = true;
expressionAreaWithNiches.defaultValue.propertyExpressions = {
  "SUM ( ###Property:2FEF2535-7688-4A26-A0C8-2E892CBDCFD8###, ###Property:D53B1F63-5552-47FB-BD5B-FB1F57FEACEA### )"
};
err = ACAPI_Property_CreatePropertyDefinition (expressionAreaWithNiches);
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Weirdly enough, the expression syntax I used in that code is reported as an incorrect expression syntax by &lt;A href="https://graphisoft.github.io/archicad-api-devkit/group___property.html#gaa705a3dfe9e4a544b07fea8fccea9f8e" target="_blank"&gt;ACAPI_Property_CheckPropertyExpressionString&lt;/A&gt; (available since AC27).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following two syntax variations are accepted by &lt;STRONG&gt;ACAPI_Property_CheckPropertyExpressionString&lt;/STRONG&gt;, but they don't work with &lt;STRONG&gt;ACAPI_Property_CreatePropertyDefinition&lt;/STRONG&gt;!&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;"SUM ({Property:Zone / Measured Area}, {Property:Zone / Wall Inset Top Surface Area}) "
"SUM ( {Property:2FEF2535-7688-4A26-A0C8-2E892CBDCFD8}, {Property:D53B1F63-5552-47FB-BD5B-FB1F57FEACEA} )"
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Seems like strange behavior. Is this intended &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;?&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 14:26:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604042#M9375</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2024-05-16T14:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604065#M9376</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527"&gt;@BerndSchwarzenbacher&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for checking!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using '{}' as separators doesn't work, but '###' does:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"SUM (###Property:Zone / Measured Area###, ###Property:Zone / Wall Inset Top Surface Area###)"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 16:24:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604065#M9376</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-05-16T16:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Based Properties in AC 27 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604083#M9377</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527"&gt;@BerndSchwarzenbacher&lt;/a&gt;&amp;nbsp;, that was my last thought. After I tried the suggestion of&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;....I realised that every time I call the&amp;nbsp;ACAPI_Property_GetPropertyExprReferenceString() function it gives me the ###......###.&lt;/P&gt;&lt;P&gt;Now you sent it...THANK YOU&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/8527"&gt;@BerndSchwarzenbacher&lt;/a&gt;&amp;nbsp; &amp;amp;&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp; for your help. I am learning alot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 19:28:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Expression-Based-Properties-in-AC-27-API/m-p/604083#M9377</guid>
      <dc:creator>Apollos</dc:creator>
      <dc:date>2024-05-16T19:28:37Z</dc:date>
    </item>
  </channel>
</rss>

