<?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 How can I hide or show layers by name? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-can-I-hide-or-show-layers-by-name/m-p/581060#M9012</link>
    <description>&lt;P&gt;How to hide or show the ESC layer as shown in the image below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-10-31 231451.png" style="width: 948px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/50738i99BB0E30CB633949/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-10-31 231451.png" alt="Screenshot 2023-10-31 231451.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-12-20 011358.png" style="width: 833px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/50739i20313D2CE8DD9CED/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-12-20 011358.png" alt="Screenshot 2023-12-20 011358.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2024 10:42:53 GMT</pubDate>
    <dc:creator>Linh</dc:creator>
    <dc:date>2024-09-17T10:42:53Z</dc:date>
    <item>
      <title>How can I hide or show layers by name?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-can-I-hide-or-show-layers-by-name/m-p/581060#M9012</link>
      <description>&lt;P&gt;How to hide or show the ESC layer as shown in the image below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-10-31 231451.png" style="width: 948px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/50738i99BB0E30CB633949/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-10-31 231451.png" alt="Screenshot 2023-10-31 231451.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-12-20 011358.png" style="width: 833px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/50739i20313D2CE8DD9CED/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-12-20 011358.png" alt="Screenshot 2023-12-20 011358.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 10:42:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-can-I-hide-or-show-layers-by-name/m-p/581060#M9012</guid>
      <dc:creator>Linh</dc:creator>
      <dc:date>2024-09-17T10:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I hide or show layers by name?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-can-I-hide-or-show-layers-by-name/m-p/581361#M9036</link>
      <description>&lt;P&gt;Hi Linh,&lt;BR /&gt;&lt;BR /&gt;You have to change the bit of APILay_Hidden in the attr.header.flags attribute to get the desired result.&lt;BR /&gt;&lt;BR /&gt;If you always want to show or hide the layer then use the proper branch of the commented solution.&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;		GS::UniString attrName = *attr.header.uniStringNamePtr;

		if (attrName == "Structural - Bearing") {
			/* change the bit to the opposite in case if you need a one-way solution
			const bool isHiddenLayer = attr.header.flags &amp;amp; APILay_Hidden;
			if (isHiddenLayer) {
				attr.header.flags &amp;amp;= ~APILay_Hidden;
			} else {
				attr.header.flags |= APILay_Hidden;
			}
			*/

			// change the bit to the opposite in one line
			attr.header.flags ^= APILay_Hidden;

			ACAPI_Attribute_Modify (&amp;amp;attr, nullptr);
		}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Kind Regards,&lt;BR /&gt;Ákos&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 13:46:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-can-I-hide-or-show-layers-by-name/m-p/581361#M9036</guid>
      <dc:creator>Akos Nagy</dc:creator>
      <dc:date>2023-12-21T13:46:46Z</dc:date>
    </item>
  </channel>
</rss>

