<?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: ACAPI_Attribute_GetAttributesFromProject problems in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Attribute-GetAttributesFromProject-problems/m-p/666048#M10459</link>
    <description>&lt;P&gt;Checked with Dev Kit 28 too.&lt;/P&gt;&lt;P&gt;Very similar result.&lt;/P&gt;&lt;P&gt;The resultArray reports size = 0 with attributes: Layer, Material, MEPSystem and BuildingMaterial attribute types.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jun 2025 09:21:28 GMT</pubDate>
    <dc:creator>SzokeFerenc</dc:creator>
    <dc:date>2025-06-17T09:21:28Z</dc:date>
    <item>
      <title>ACAPI_Attribute_GetAttributesFromProject problems</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Attribute-GetAttributesFromProject-problems/m-p/665517#M10451</link>
      <description>&lt;P&gt;Hi Everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm experimenting with the ACAPI_Attribute_GetAttributesFromProject function. And I'm getting strange results, I want to ask you what am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code I'm trying to run:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;GSErrCode err = NoError;
for (GS::USize i = 0; i &amp;lt; fileLocs.GetSize(); i++)
{

	for (GS::USize j = 0; j &amp;lt; attrTypes.GetSize(); j++)
	{
		GS::Array&amp;lt;GS::Pair&amp;lt;API_Attribute, API_AttributeDefExt&amp;gt;&amp;gt; resultArray;
		err = ACAPI_Attribute_GetAttributesFromProject(fileLocs[i], attrTypes[j], &amp;amp;resultArray);
		if (err == NoError)
		{
			ACAPI_WriteReport("Found " + GS::ValueToUniString(resultArray.GetSize()) + " " + AttrTypeToString(attrTypes[j]) + " attrubites in external file", true);
		}
		else
		{
			ACAPI_WriteReport("Error: " + GS::ValueToUniString(err), true);
		}
	}
		
}&lt;/LI-CODE&gt;&lt;P&gt;I'm building it with the&amp;nbsp;API Development Kit 26.3000. The function returns with err == NoError.&lt;/P&gt;&lt;P&gt;My first attempt was to see if the function works to check the size of resultArray, which I assume should be equal to the number of attributes belonging to each type.&lt;/P&gt;&lt;P&gt;My problem is that resultArray reports size = 0 with some attribute types (Pen, Layer, Material, Font, DimStandards, ModelViewOptions, MEPSystem, BuildingMaterial) although there are many attributes of each type in the file.&lt;/P&gt;&lt;P&gt;With the other attribute types the size of resultArray is as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Does this function not work with all attribute types?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 20:53:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Attribute-GetAttributesFromProject-problems/m-p/665517#M10451</guid>
      <dc:creator>SzokeFerenc</dc:creator>
      <dc:date>2025-06-12T20:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Attribute_GetAttributesFromProject problems</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Attribute-GetAttributesFromProject-problems/m-p/666048#M10459</link>
      <description>&lt;P&gt;Checked with Dev Kit 28 too.&lt;/P&gt;&lt;P&gt;Very similar result.&lt;/P&gt;&lt;P&gt;The resultArray reports size = 0 with attributes: Layer, Material, MEPSystem and BuildingMaterial attribute types.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 09:21:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Attribute-GetAttributesFromProject-problems/m-p/666048#M10459</guid>
      <dc:creator>SzokeFerenc</dc:creator>
      <dc:date>2025-06-17T09:21:28Z</dc:date>
    </item>
  </channel>
</rss>

