# FamilyInstance.ByFace with ElementFaceReference

**URL:** <https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928>\
**Category:** Geometry\
**Tags:** familyinstance\
**Created:** [June 19, 2018, 7:41am UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928 "2018-06-19T07:41:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Pallaria](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@Christian\_Pallaria](https://forum.dynamobim.com/u/Christian_Pallaria)\
**Post date:** [June 19, 2018, 7:41am UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928/1 "2018-06-19T07:41:37Z")

</div>

Hi all,  
I’ve a problem with a little dynamo code: I’m trying to insert a Surface Based Familty onto a selected surface using attached code. It works good with Revit Elements (as walls, floors and roofs) but it doesn’t work with custom element (model in place or families).  
I tried to convert the selected surface to Element.ElementFaceReference but it doesn’t work.

I tried with a Python script using face.Tags.LookupTag(“RevitFaceReference”), but it doesn’t work.

Could anyone of you figure out what the problem is and how can I solve it?

 ![ByFace_2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/a/1a730d086eb1752703b0df547759f833b8aba4ba.PNG) ![ByFace_1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/3/73c38a712db621b39ab1f1e34092cde599cca379.PNG)[FamilyInstance.ByFace.dyn](https://forum.dynamobim.com/uploads/short-url/cngDhke5UAU1IESsY06LJGG71Cl.dyn) (11.9 KB)

I tried to upload even a rvt file as example but the website doesn’t allow me to upload it. In any case try the code with a normal roof and then with the same roof modeled using model in place technique. In first case it works good, in second case no.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [June 19, 2018, 12:17pm UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928/2 "2018-06-19T12:17:31Z")

</div>

Hi @Christian_Pallaria

Family.InstanceByFace face input needs surface but you where feeding Element.FaceReference to it try this it should solve your issue.

 ![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/5/25e8d5e637f5d9d04d8aee0e8359871ea0af5593.png)

---

<div class="post-metadata">

**Author:** ![Christian\_Pallaria](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@Christian\_Pallaria](https://forum.dynamobim.com/u/Christian_Pallaria)\
**Post date:** [July 9, 2018, 7:59am UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928/3 "2018-07-09T07:59:39Z")

</div>

Thanks a lot Kulkul!

---

<div class="post-metadata">

**Author:** ![Christian\_Pallaria](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@Christian\_Pallaria](https://forum.dynamobim.com/u/Christian_Pallaria)\
**Post date:** [July 10, 2018, 10:34am UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928/4 "2018-07-10T10:34:01Z")

</div>

Hi, now the code works, but when I use it more times it delete all elements created and create others new elements depending on new parameters, but I would like to keep the old element and create others. How can I solve the problem?

---

<div class="post-metadata">

**Author:** ![caioludovico](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@caioludovico](https://forum.dynamobim.com/u/caioludovico)\
**Post date:** [July 18, 2022, 9:18pm UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928/5 "2022-07-18T21:18:19Z")

</div>

Use dynamo player instead of dynamo

---

<div class="post-metadata">

**Author:** ![neonaj](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@neonaj](https://forum.dynamobim.com/u/neonaj)\
**Post date:** [September 24, 2024, 5:20am UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928/6 "2024-09-24T05:20:01Z")

</div>

Is it possible to change point on face from an input list insted off dividing it by u v points

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [June 9, 2025, 9:56am UTC](https://forum.dynamobim.com/t/familyinstance-byface-with-elementfacereference/22928/7 "2025-06-09T09:56:39Z")

</div>

Absolutely yes
