<?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: How to access manufacturer data in Building Material in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-access-manufacturer-data-in-Building-Material/m-p/237229#M2540</link>
    <description>In case of id, manufacturer and description parameters Archicad fills these values only if they are pointing to an existing GS::UniString object. In your code all of them are null pointers, so they don't filled.&lt;BR /&gt;
&lt;BR /&gt;
You can use something like this to make it work (it accesses only the manufacturer data, but should work for the other two as well):
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;API_Attribute attrib;
BNZeroMemory (&amp;amp;attrib, sizeof (API_Attribute));
attrib.header.typeID = API_BuildingMaterialID;
attrib.header.index = attributeIndex;

GS::UniString manufacturer;
attrib.buildingMaterial.manufacturer = &amp;amp;manufacturer;
ACAPI_Attribute_Get (&amp;amp;attrib);
&lt;/PRE&gt;</description>
    <pubDate>Sat, 16 Jan 2021 17:38:02 GMT</pubDate>
    <dc:creator>Viktor Kovacs</dc:creator>
    <dc:date>2021-01-16T17:38:02Z</dc:date>
    <item>
      <title>How to access manufacturer data in Building Material</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-access-manufacturer-data-in-Building-Material/m-p/237228#M2539</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;I am currently trying to work with Building Materials. &lt;BR /&gt;First, I create a Building material and add it to the list. This works fine and all the information is there (including ID, manufacturer, description). However, when I try to access those, they are all NULL.&lt;BR /&gt;&lt;BR /&gt;&lt;S&gt;&lt;/S&gt;&lt;A href="https://imgur.com/a/ZXjOfGI" target="_blank"&gt;https://imgur.com/a/ZXjOfGI&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Here is how I access the Building Materials:&lt;BR /&gt;
&lt;PRE&gt;	err = ACAPI_Attribute_GetNum(API_BuildingMaterialID, &amp;amp;count);
	if (err != NoError)
		return materials;

	for (i = 1; i &amp;lt;= count; i++) {
		BNZeroMemory(&amp;amp;attrib, sizeof(API_Attribute));
		attrib.header.typeID = API_BuildingMaterialID;
		attrib.header.index = i;
		err = ACAPI_Attribute_Get(&amp;amp;attrib);
        }&lt;/PRE&gt;
My question is what is the problem here? Why are those properties NULL?&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 11:35:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-access-manufacturer-data-in-Building-Material/m-p/237228#M2539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-14T11:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to access manufacturer data in Building Material</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-access-manufacturer-data-in-Building-Material/m-p/237229#M2540</link>
      <description>In case of id, manufacturer and description parameters Archicad fills these values only if they are pointing to an existing GS::UniString object. In your code all of them are null pointers, so they don't filled.&lt;BR /&gt;
&lt;BR /&gt;
You can use something like this to make it work (it accesses only the manufacturer data, but should work for the other two as well):
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;API_Attribute attrib;
BNZeroMemory (&amp;amp;attrib, sizeof (API_Attribute));
attrib.header.typeID = API_BuildingMaterialID;
attrib.header.index = attributeIndex;

GS::UniString manufacturer;
attrib.buildingMaterial.manufacturer = &amp;amp;manufacturer;
ACAPI_Attribute_Get (&amp;amp;attrib);
&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jan 2021 17:38:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-access-manufacturer-data-in-Building-Material/m-p/237229#M2540</guid>
      <dc:creator>Viktor Kovacs</dc:creator>
      <dc:date>2021-01-16T17:38:02Z</dc:date>
    </item>
  </channel>
</rss>

