<?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: Element Quantities is zero in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Element-Quantities-is-zero/m-p/257553#M3418</link>
    <description>Hi ,Maybe you are not using ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_SETFULL(mask);&lt;BR /&gt;
I am working normally in AC22.
&lt;PRE&gt;	
        GSErrCode			err = NoError;
	API_ElementQuantity	quantity;
	API_QuantitiesMask	mask;
	API_Quantities		quantities;
	API_QuantityPar		par;
	GS::Array&amp;lt;API_CompositeQuantity&amp;gt;         composites;
	quantities.composites = &amp;amp;composites;
	quantities.elements = &amp;amp;quantity;
	par.minOpeningSize = 0.3;
	ACAPI_ELEMENT_QUANTITY_MASK_SET(mask, column, coreVolume);
	ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_SETFULL(mask);
	err = ACAPI_Element_GetQuantities(guid, &amp;amp;par, &amp;amp;quantities, &amp;amp;mask);
	ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_CLEAR(mask);
	ACAPI_ELEMENT_QUANTITY_MASK_CLEAR(mask);&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Nov 2018 03:41:55 GMT</pubDate>
    <dc:creator>leilei</dc:creator>
    <dc:date>2018-11-01T03:41:55Z</dc:date>
    <item>
      <title>Element Quantities is zero</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Element-Quantities-is-zero/m-p/257552#M3417</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Tried the following on AC22:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;API_ElementQuantity eq;
GS::Array&amp;lt;API_CompositeQuantity&amp;gt; qcq;
API_Quantities q;
API_QuantityPar qp;
API_QuantitiesMask qm;
ACAPI_ELEMENT_QUANTITY_MASK_CLEAR(qm);
ACAPI_ELEMENT_QUANTITY_MASK_SETFULL(qm);
qp.minOpeningSize = 0.00;
q.elements = &amp;amp;eq;
q.composites = &amp;amp;qcq;
err = ACAPI_Element_GetQuantities(elem.header.guid, &amp;amp;qp, &amp;amp;q, &amp;amp;qm);
int cqCnt = qcq.GetSize();&lt;/PRE&gt;
&lt;BR /&gt;It is inside a loop, where each element is being check, in this case, if it is wall or column. Then, will try to get the quantities of building material and/or surface of the element (depends on the input of the user).&lt;BR /&gt;&lt;BR /&gt;There are no error (err = NoError) but the cqCnt is always zero on any model structure type (basic, composite, or profile)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; Also for AC21. AC20 is okay.&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Oct 2022 11:33:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Element-Quantities-is-zero/m-p/257552#M3417</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2022-10-05T11:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Element Quantities is zero</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Element-Quantities-is-zero/m-p/257553#M3418</link>
      <description>Hi ,Maybe you are not using ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_SETFULL(mask);&lt;BR /&gt;
I am working normally in AC22.
&lt;PRE&gt;	
        GSErrCode			err = NoError;
	API_ElementQuantity	quantity;
	API_QuantitiesMask	mask;
	API_Quantities		quantities;
	API_QuantityPar		par;
	GS::Array&amp;lt;API_CompositeQuantity&amp;gt;         composites;
	quantities.composites = &amp;amp;composites;
	quantities.elements = &amp;amp;quantity;
	par.minOpeningSize = 0.3;
	ACAPI_ELEMENT_QUANTITY_MASK_SET(mask, column, coreVolume);
	ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_SETFULL(mask);
	err = ACAPI_Element_GetQuantities(guid, &amp;amp;par, &amp;amp;quantities, &amp;amp;mask);
	ACAPI_ELEMENT_COMPOSITES_QUANTITY_MASK_CLEAR(mask);
	ACAPI_ELEMENT_QUANTITY_MASK_CLEAR(mask);&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Nov 2018 03:41:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Element-Quantities-is-zero/m-p/257553#M3418</guid>
      <dc:creator>leilei</dc:creator>
      <dc:date>2018-11-01T03:41:55Z</dc:date>
    </item>
  </channel>
</rss>

