<?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 Wall Building Material Questions in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Wall-Building-Material-Questions/m-p/278002#M5620</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hey. I was exploring materials for walls, and found the short buildingMaterial.&lt;BR /&gt;However I failed to find any type of documentation regarding what value corresponds to what material, for example, 45 -&amp;gt; Glass. &lt;BR /&gt;I made a .txt containing all the materials I was able to find using different values for buildingMaterial.&lt;BR /&gt;&lt;BR /&gt;I have two questions regarding this. First, is there an official mapping the short value to the material that I wasn't able to find.&lt;BR /&gt;Second, this values will never change in future updates, can I count on the number 45 always being Glass, for example.&lt;BR /&gt;&lt;BR /&gt;I added as an attachment the .txt containing my mapping of short value to material.&lt;BR /&gt;EDIT: I wasn't able to get the attachement working, I will leave here a small portion of the .txt, if you want to see the full list, I will do another post with it.&lt;BR /&gt;0 = Brick&lt;BR /&gt;1 = Brick&lt;BR /&gt;2 = Brick - Structural&lt;BR /&gt;3 = Brick - Finish&lt;BR /&gt;4 = Masonry Block - Structural&lt;BR /&gt;5 = Masonry Block - Filler&lt;BR /&gt;...&lt;/DIV&gt;</description>
    <pubDate>Thu, 13 Jul 2023 13:54:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-13T13:54:37Z</dc:date>
    <item>
      <title>Wall Building Material Questions</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Wall-Building-Material-Questions/m-p/278002#M5620</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hey. I was exploring materials for walls, and found the short buildingMaterial.&lt;BR /&gt;However I failed to find any type of documentation regarding what value corresponds to what material, for example, 45 -&amp;gt; Glass. &lt;BR /&gt;I made a .txt containing all the materials I was able to find using different values for buildingMaterial.&lt;BR /&gt;&lt;BR /&gt;I have two questions regarding this. First, is there an official mapping the short value to the material that I wasn't able to find.&lt;BR /&gt;Second, this values will never change in future updates, can I count on the number 45 always being Glass, for example.&lt;BR /&gt;&lt;BR /&gt;I added as an attachment the .txt containing my mapping of short value to material.&lt;BR /&gt;EDIT: I wasn't able to get the attachement working, I will leave here a small portion of the .txt, if you want to see the full list, I will do another post with it.&lt;BR /&gt;0 = Brick&lt;BR /&gt;1 = Brick&lt;BR /&gt;2 = Brick - Structural&lt;BR /&gt;3 = Brick - Finish&lt;BR /&gt;4 = Masonry Block - Structural&lt;BR /&gt;5 = Masonry Block - Filler&lt;BR /&gt;...&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:54:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Wall-Building-Material-Questions/m-p/278002#M5620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-13T13:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Building Material Questions</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Wall-Building-Material-Questions/m-p/278003#M5621</link>
      <description>&lt;BLOCKQUOTE&gt;First, is there an official mapping the short value to the material that I wasn't able to find.&lt;/BLOCKQUOTE&gt;
Yes. There is an example on &lt;FONT color="#808080"&gt;ACAPI_Attribute_Get&lt;/FONT&gt; (Example II) for this.&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;Second, this values will never change in future updates, can I count on the number 45 always being Glass, for example. &lt;/BLOCKQUOTE&gt;
No. Since you can modify the list on Options &amp;gt; Element Attributes &amp;gt; Building Materials... dialog.</description>
      <pubDate>Tue, 30 Jun 2015 09:39:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Wall-Building-Material-Questions/m-p/278003#M5621</guid>
      <dc:creator>ReignBough</dc:creator>
      <dc:date>2015-06-30T09:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Wall Building Material Questions</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Wall-Building-Material-Questions/m-p/278004#M5622</link>
      <description>Hey, thank you for your answer it was very useful. Using the example you pointed out, I was able to create a file with the current names of the materials.&lt;BR /&gt;
&lt;BR /&gt;
I will leave here the code:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	GSErrCode err;
	ofstream file;
	API_Attribute  attrib;
	short n;

	BNZeroMemory(&amp;amp;attrib, sizeof(API_Attribute));

	attrib.header.typeID = API_BuildingMaterialID;
	err = ACAPI_Attribute_GetNum(API_BuildingMaterialID, &amp;amp;n);
	
	file.open("ListOfMaterials.txt");
	for (int i = 1; i &amp;lt;= n &amp;amp;&amp;amp; err == NoError; i++) {
		attrib.header.index = i;
		err = ACAPI_Attribute_Get(&amp;amp;attrib);
		if (err == NoError) {
			file &amp;lt;&amp;lt; attrib.buildingMaterial.head.name &amp;lt;&amp;lt; "\n";
		}
		if (err == APIERR_DELETED){
			err = NoError;
		}
	}
	file.close();
&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jul 2015 14:52:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Wall-Building-Material-Questions/m-p/278004#M5622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-03T14:52:21Z</dc:date>
    </item>
  </channel>
</rss>

