<?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 to get the host face of an instance if the host face is from linked document? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12825655#M4834</link>
    <description>&lt;P&gt;I'm wondering how I can get the host face of a family instance that is hosted to a face coming from a linked document?&lt;/P&gt;&lt;P&gt;In such cases, the Host is set to the linked Element, and if I use the hostFace.LinkedElementId Id, I'm - as the name implies - some kind of Element (Material, DirectShape,Wall,...). But I would want to get the actual face. How would I achieve that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the reference living in instance.HostFace directly (both on the main and the linked document), but that didn't work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grubdex_0-1717771711371.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1373274i018816C2FA98C3CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grubdex_0-1717771711371.png" alt="grubdex_0-1717771711371.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grubdex_1-1717771724937.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1373275i07D21A05CDD807AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grubdex_1-1717771724937.png" alt="grubdex_1-1717771724937.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grubdex_2-1717771793108.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1373276i27C270B1C7E395B8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grubdex_2-1717771793108.png" alt="grubdex_2-1717771793108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 14:51:41 GMT</pubDate>
    <dc:creator>grubdex</dc:creator>
    <dc:date>2024-06-07T14:51:41Z</dc:date>
    <item>
      <title>How to get the host face of an instance if the host face is from linked document?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12825655#M4834</link>
      <description>&lt;P&gt;I'm wondering how I can get the host face of a family instance that is hosted to a face coming from a linked document?&lt;/P&gt;&lt;P&gt;In such cases, the Host is set to the linked Element, and if I use the hostFace.LinkedElementId Id, I'm - as the name implies - some kind of Element (Material, DirectShape,Wall,...). But I would want to get the actual face. How would I achieve that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the reference living in instance.HostFace directly (both on the main and the linked document), but that didn't work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grubdex_0-1717771711371.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1373274i018816C2FA98C3CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grubdex_0-1717771711371.png" alt="grubdex_0-1717771711371.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grubdex_1-1717771724937.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1373275i07D21A05CDD807AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grubdex_1-1717771724937.png" alt="grubdex_1-1717771724937.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grubdex_2-1717771793108.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1373276i27C270B1C7E395B8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grubdex_2-1717771793108.png" alt="grubdex_2-1717771793108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 14:51:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12825655#M4834</guid>
      <dc:creator>grubdex</dc:creator>
      <dc:date>2024-06-07T14:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host face of an instance if the host face is from linked document?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12825867#M4835</link>
      <description>&lt;P&gt;You can query the element in the linked file for its geometry. To do so, you probably need to determine its host Document and use the&amp;nbsp;&lt;SPAN&gt;LinkedElementId to open the element &lt;STRONG&gt;&lt;U&gt;in that document&lt;/U&gt;&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 16:12:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12825867#M4835</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-06-07T16:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host face of an instance if the host face is from linked document?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12826819#M4836</link>
      <description>&lt;P&gt;see if &lt;A href="https://sharpbim.hashnode.dev/face-of-a-linked-element" target="_blank" rel="noopener"&gt;this explanation&lt;/A&gt; helps, it is also aligned to what&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt;&amp;nbsp;mentioned&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short: t&lt;SPAN&gt;o get the host face of a family instance that is hosted to a face from a linked document, you can follow these steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1. &lt;STRONG&gt;Retrieve the Host Face Reference&lt;/STRONG&gt;: Access the `HostFace` property of the family instance to get the reference to the host face.&lt;/P&gt;&lt;P&gt;2. &lt;STRONG&gt;Get the Linked Document&lt;/STRONG&gt;: Use the `LinkedElementId` to find the corresponding linked document and element.&lt;/P&gt;&lt;P&gt;3. &lt;STRONG&gt;Resolve the Linked Face&lt;/STRONG&gt;: Use the `Document.GetElement` method with the `LinkedElementId` to obtain the element from the linked document.&lt;/P&gt;&lt;P&gt;4. &lt;STRONG&gt;Get Geometry from the Linked Element&lt;/STRONG&gt;: Extract the geometry from the linked element using the `GeometryElement` method.&lt;/P&gt;&lt;P&gt;5. &lt;STRONG&gt;Match the Reference&lt;/STRONG&gt;: Compare the reference obtained in step 1 with the faces of the geometry extracted to identify the exact face.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2024 11:09:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12826819#M4836</guid>
      <dc:creator>Moustafa_K</dc:creator>
      <dc:date>2024-06-08T11:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host face of an instance if the host face is from linked document?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12830104#M4837</link>
      <description>&lt;P&gt;Thanks for the detailing the steps to get there! What would I use to do the matching you suggested in Step 5? Which property do both the geometry face as well as the HostFace reference have in common?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 15:08:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12830104#M4837</guid>
      <dc:creator>grubdex</dc:creator>
      <dc:date>2024-06-10T15:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host face of an instance if the host face is from linked document?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12830734#M4838</link>
      <description>&lt;P&gt;Have placed a sample code over &lt;A href="https://sharpbim.hashnode.dev/face-of-a-linked-element" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Try it and let us know your findings. Basically i am converting to string and comapring strings&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 20:02:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-host-face-of-an-instance-if-the-host-face-is-from/m-p/12830734#M4838</guid>
      <dc:creator>Moustafa_K</dc:creator>
      <dc:date>2024-06-10T20:02:32Z</dc:date>
    </item>
  </channel>
</rss>

