<?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 Creating surface attribute in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Creating-surface-attribute/m-p/269931#M2386</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create new surfaces from scratch using custom textures (Basic Engine only).&lt;BR /&gt;So far I got through setting up the library folder for texture images and creating API_Texture attribute with API function. However, I'm constantly getting mixed results that seem to have something to do with API_Texture.status field. &lt;BR /&gt;For instance, if status == 0 no texture image is loaded. Different values produce different results with mirroring, alpha channel settings and so on. &lt;BR /&gt;Is there any reference on how does this thing work? Or is there any other, more 'proper' way of creating surfaces with API?&lt;BR /&gt;&lt;BR /&gt;Also, how do I set the vectorial hatching for the surface?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/DIV&gt;</description>
    <pubDate>Wed, 15 Sep 2021 07:54:34 GMT</pubDate>
    <dc:creator>Lk_</dc:creator>
    <dc:date>2021-09-15T07:54:34Z</dc:date>
    <item>
      <title>Creating surface attribute</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Creating-surface-attribute/m-p/269931#M2386</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create new surfaces from scratch using custom textures (Basic Engine only).&lt;BR /&gt;So far I got through setting up the library folder for texture images and creating API_Texture attribute with API function. However, I'm constantly getting mixed results that seem to have something to do with API_Texture.status field. &lt;BR /&gt;For instance, if status == 0 no texture image is loaded. Different values produce different results with mirroring, alpha channel settings and so on. &lt;BR /&gt;Is there any reference on how does this thing work? Or is there any other, more 'proper' way of creating surfaces with API?&lt;BR /&gt;&lt;BR /&gt;Also, how do I set the vectorial hatching for the surface?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 07:54:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Creating-surface-attribute/m-p/269931#M2386</guid>
      <dc:creator>Lk_</dc:creator>
      <dc:date>2021-09-15T07:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating surface attribute</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Creating-surface-attribute/m-p/269932#M2387</link>
      <description>Hey,&lt;BR /&gt;
Here are the possible values for the status field with a little explanation. Note that you can use multiple using binary operations (as you would with masks).
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;
	#define	APITxtr_LinkMat			0x1000		/**&amp;lt; texture linked to a material	*/

	#define	APITxtr_MirrorY			0x0800		/**&amp;lt; mirrored in Y direction */
	#define	APITxtr_MirrorX			0x0400		/**&amp;lt; mirrored in X direction */
	#define	APITxtr_RandomShift		0x0200		/**&amp;lt; shifted randomly */

	#define	APITxtr_SurfacePattern	0x0100		/**&amp;lt; alpha channel changes the surface color of the texture */
	#define	APITxtr_AmbientPattern	0x0080		/**&amp;lt; alpha channel changes the ambient color of the texture */
	#define	APITxtr_SpecularPattern	0x0040		/**&amp;lt; alpha channel changes the specular color of the texture */
	#define	APITxtr_DiffusePattern	0x0020		/**&amp;lt; alpha channel changes the diffuse color of the texture */
	#define	APITxtr_BumpPattern		0x0010		/**&amp;lt; bump mapping or surface normal perturbation */
	#define	APITxtr_TransPattern	0x0008		/**&amp;lt; alpha channel changes the transparency of the texture */

	#define	APITxtr_FillRectNatur	0x0004		/**&amp;lt; fit the rectangle with the picture in a central position	*/
												/**&amp;lt; using the natural aspect ratio of the picture */
	#define	APITxtr_FitPictNatur	0x0002		/**&amp;lt; fit the the picture in the middle of the rectangle */
												/**&amp;lt; using the natural aspect ratio of the picture */
	#define	APITxtr_UseAlpha		0x0001		/**&amp;lt; use alpha channel */
&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 10:18:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Creating-surface-attribute/m-p/269932#M2387</guid>
      <dc:creator>akomporday</dc:creator>
      <dc:date>2020-08-11T10:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating surface attribute</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Creating-surface-attribute/m-p/269933#M2388</link>
      <description>That's exactly what I needed.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Tue, 11 Aug 2020 10:36:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Creating-surface-attribute/m-p/269933#M2388</guid>
      <dc:creator>Lk_</dc:creator>
      <dc:date>2020-08-11T10:36:39Z</dc:date>
    </item>
  </channel>
</rss>

