<?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 can I hide a Library Item Reference Image? in Forma Site Design Developer Forum</title>
    <link>https://forums.autodesk.com/t5/forma-site-design-developer/how-can-i-hide-a-library-item-reference-image/m-p/13000495#M168</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Iklimis, Thanks for the feedback. We are working on a solution to help you open a list of refrenceImages on the proposal layers.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;SPAN&gt;Files can be hidden using&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;Forma.render.hideElement({path: "root/some-key/some-other-key")&lt;/CODE&gt;. If you're not sure how you can figure out the path of an element, you can generate a map of paths to urn like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;LI-CODE lang="general"&gt;async function getPathsToUrn() {
  const rootUrn = await Forma.proposal.getRootUrn();
  const elementTree = await Forma.elements.get({
    urn: rootUrn,
    recursive: true,
  });
  const pathsToUrn = new Map&amp;lt;string, Urn&amp;gt;();
  function traverse(child: Child, currentPath: string) {
    const newPath = `${currentPath}/${child.key}`;
    pathsToUrn.set(newPath, child.urn);
    const element = elementTree.elements[child.urn];
    if (!element) return;
    element.children?.forEach((child) =&amp;gt; {
      traverse(child, newPath);
    });
  }

  pathsToUrn.set("root", rootUrn);
  elementTree.element.children?.forEach((child) =&amp;gt; {
    traverse(child, "root");
  });
  console.log(pathsToUrn);
}​&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 14:29:04 GMT</pubDate>
    <dc:creator>samarvir_singh_bhayana</dc:creator>
    <dc:date>2024-09-04T14:29:04Z</dc:date>
    <item>
      <title>How can I hide a Library Item Reference Image?</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/how-can-i-hide-a-library-item-reference-image/m-p/13000263#M167</link>
      <description>&lt;P&gt;Hello Forma Team,&amp;nbsp;&lt;/P&gt;&lt;P&gt;After successfully creating a geoJson containing a&amp;nbsp; Reference Image as Library Item I encounter the following issue:&lt;BR /&gt;&lt;BR /&gt;I have already have created the said image as a &lt;U&gt;texture&lt;/U&gt; in my Forma canvas as the user uses the extension - after creating the Image as a Library Element and adding the said Element I would like the Element to not be showing because it would be overlapping with the already existing texture - instead I would like the Library Element to be &lt;U&gt;firstly hidden&lt;/U&gt; and if the user chooses to see it they should be able to do it in the Library Section by pressing the &lt;U&gt;eye icon of the 'Reference Image'&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;I tried adding the Element and using the Render Api to hide it but when I go to the Library to show it by clicking the eye icon it does not work&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Possibly for&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13577411"&gt;@samarvir_singh_bhayana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your help&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 12:59:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/how-can-i-hide-a-library-item-reference-image/m-p/13000263#M167</guid>
      <dc:creator>iklimis</dc:creator>
      <dc:date>2024-09-04T12:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I hide a Library Item Reference Image?</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/how-can-i-hide-a-library-item-reference-image/m-p/13000495#M168</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Iklimis, Thanks for the feedback. We are working on a solution to help you open a list of refrenceImages on the proposal layers.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;SPAN&gt;Files can be hidden using&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="c-mrkdwn__code" data-stringify-type="code"&gt;Forma.render.hideElement({path: "root/some-key/some-other-key")&lt;/CODE&gt;. If you're not sure how you can figure out the path of an element, you can generate a map of paths to urn like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;LI-CODE lang="general"&gt;async function getPathsToUrn() {
  const rootUrn = await Forma.proposal.getRootUrn();
  const elementTree = await Forma.elements.get({
    urn: rootUrn,
    recursive: true,
  });
  const pathsToUrn = new Map&amp;lt;string, Urn&amp;gt;();
  function traverse(child: Child, currentPath: string) {
    const newPath = `${currentPath}/${child.key}`;
    pathsToUrn.set(newPath, child.urn);
    const element = elementTree.elements[child.urn];
    if (!element) return;
    element.children?.forEach((child) =&amp;gt; {
      traverse(child, newPath);
    });
  }

  pathsToUrn.set("root", rootUrn);
  elementTree.element.children?.forEach((child) =&amp;gt; {
    traverse(child, "root");
  });
  console.log(pathsToUrn);
}​&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 14:29:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/how-can-i-hide-a-library-item-reference-image/m-p/13000495#M168</guid>
      <dc:creator>samarvir_singh_bhayana</dc:creator>
      <dc:date>2024-09-04T14:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I hide a Library Item Reference Image?</title>
      <link>https://forums.autodesk.com/t5/forma-site-design-developer/how-can-i-hide-a-library-item-reference-image/m-p/13000818#M169</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13577411"&gt;@samarvir_singh_bhayana&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I had no issue getting the Reference Image Element's path using the Render Api and hiding the element&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My issue is that when I hide the Element programmatically through the extension I need the user to restore its visibility through the Library Layer section by clicking the eye icon&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iklimis_0-1725468256494.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1405728i721F9C6F41D0DFB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="iklimis_0-1725468256494.png" alt="iklimis_0-1725468256494.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 16:44:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/forma-site-design-developer/how-can-i-hide-a-library-item-reference-image/m-p/13000818#M169</guid>
      <dc:creator>iklimis</dc:creator>
      <dc:date>2024-09-04T16:44:19Z</dc:date>
    </item>
  </channel>
</rss>

