<?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: Way to get the Value of a SingelChoiceEnum in a API_Property? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Way-to-get-the-Value-of-a-SingelChoiceEnum-in-a-API-Property/m-p/387736#M980</link>
    <description>&lt;P&gt;Single choice enumeration works this way:&lt;/P&gt;
&lt;P&gt;- The possible choices are stored in the &lt;FONT face="courier new,courier"&gt;property.definition.possibleEnumValues&lt;/FONT&gt; array. These are (&lt;FONT face="courier new,courier"&gt;API_Variant&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;API_Variant&lt;/FONT&gt;) pairs where the first one is a single guid value, the second one is a single string value.&lt;/P&gt;
&lt;P&gt;- The selected choice is stored in&amp;nbsp;&lt;FONT face="courier new,courier"&gt;property.value.singleVariant.variant.guidValue&lt;/FONT&gt;. This contains one of the guids from the array above so you can find out the actual string value of the selected enumeration value.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jul 2023 04:50:32 GMT</pubDate>
    <dc:creator>Viktor Kovacs</dc:creator>
    <dc:date>2023-07-17T04:50:32Z</dc:date>
    <item>
      <title>Way to get the Value of a SingelChoiceEnum in a API_Property?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Way-to-get-the-Value-of-a-SingelChoiceEnum-in-a-API-Property/m-p/387704#M979</link>
      <description>&lt;P&gt;Hello evryone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im having trouble to get the Value of a API_Property, namly of the&amp;nbsp;API_PropertySingleChoiceEnumerationCollectionType.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i do something like this:&amp;nbsp;&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;GS::UniString pp = prop.value.listVariant.variants.GetFirst().uniStringValue;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i dont get a value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;even getting the array of values and iterate through the array shows that there are in fact no values stored:&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;GS::Array&amp;lt;API_Variant&amp;gt; variants = prop.value.listVariant.variants;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im only getting the value when i call the API with "ACAPI_Property_GetPropertyValueString"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the rest of the Collection types, like&amp;nbsp;API_PropertySingleCollectionType is working just fine, like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;GS::UniString pp = prop.value.singleVariant.variant.uniStringValue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i also tried if archicad writes for no reasons those values directly into the definition. but the definition only gives the answer which options there are and is therefore working as intended.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im using the&amp;nbsp;ACAPI_Element_GetPropertyValuesByGuid call to retrieve the&amp;nbsp;API_Property's&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any ideas how to get to the values of an&amp;nbsp;SingleChoiceEnumeration?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 22:33:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Way-to-get-the-Value-of-a-SingelChoiceEnum-in-a-API-Property/m-p/387704#M979</guid>
      <dc:creator>Joel Buehler</dc:creator>
      <dc:date>2023-07-16T22:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Way to get the Value of a SingelChoiceEnum in a API_Property?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Way-to-get-the-Value-of-a-SingelChoiceEnum-in-a-API-Property/m-p/387736#M980</link>
      <description>&lt;P&gt;Single choice enumeration works this way:&lt;/P&gt;
&lt;P&gt;- The possible choices are stored in the &lt;FONT face="courier new,courier"&gt;property.definition.possibleEnumValues&lt;/FONT&gt; array. These are (&lt;FONT face="courier new,courier"&gt;API_Variant&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;API_Variant&lt;/FONT&gt;) pairs where the first one is a single guid value, the second one is a single string value.&lt;/P&gt;
&lt;P&gt;- The selected choice is stored in&amp;nbsp;&lt;FONT face="courier new,courier"&gt;property.value.singleVariant.variant.guidValue&lt;/FONT&gt;. This contains one of the guids from the array above so you can find out the actual string value of the selected enumeration value.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 04:50:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Way-to-get-the-Value-of-a-SingelChoiceEnum-in-a-API-Property/m-p/387736#M980</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2023-07-17T04:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Way to get the Value of a SingelChoiceEnum in a API_Property?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Way-to-get-the-Value-of-a-SingelChoiceEnum-in-a-API-Property/m-p/387741#M981</link>
      <description>&lt;P&gt;it worked! thank you very much!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoelBuehler_0-1689574571948.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/40377iB3FEA89A305E15D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoelBuehler_0-1689574571948.png" alt="JoelBuehler_0-1689574571948.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 06:16:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Way-to-get-the-Value-of-a-SingelChoiceEnum-in-a-API-Property/m-p/387741#M981</guid>
      <dc:creator>Joel Buehler</dc:creator>
      <dc:date>2023-07-17T06:16:23Z</dc:date>
    </item>
  </channel>
</rss>

