# Element.CopyToLevel Error

**URL:** <https://forum.dynamobim.com/t/element-copytolevel-error/72341>\
**Category:** Revit\
**Created:** [January 17, 2022, 3:24am UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341 "2022-01-17T03:24:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zakim](https://avatars.discourse-cdn.com/v4/letter/z/e47774/32.png) [@zakim](https://forum.dynamobim.com/u/zakim)\
**Post date:** [January 17, 2022, 3:24am UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341/1 "2022-01-17T03:24:03Z")

</div>

Hi All,

I wonder if you can help me. I used the FamilyInstance.ByGeometry from #springs to place one solid object as Family Instance inside the Revit model.

It seems simple…! But I am stuck trying to copy that instance to another level using Element.CopyToLevel from #clockwork. And I am getting “null” value without Dynamo syntax error explanation.

I appreciate your help.

 ![TestCapture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/0/30173671b38d061b93a735b804cf45f600a8ab96.jpeg)

---

<div class="post-metadata">

**Author:** ![Hamish](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hamish](https://forum.dynamobim.com/u/Hamish)\
**Post date:** [January 17, 2022, 3:26am UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341/2 "2022-01-17T03:26:04Z")

</div>

You’re trying to copy a family element rather than a model element (or family instance). If you pass through the instance output from that node it should do the trick.

---

<div class="post-metadata">

**Author:** ![zakim](https://avatars.discourse-cdn.com/v4/letter/z/e47774/32.png) [@zakim](https://forum.dynamobim.com/u/zakim)\
**Post date:** [January 17, 2022, 5:41pm UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341/3 "2022-01-17T17:41:56Z")

</div>

Thanks @Hamish for the reply.  
I am still getting a “null” result even after passing the instance output…!

 ![TestCapture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/7/b7df5040c38158df5d3c23ff878e71861b952b02.jpeg)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [January 17, 2022, 5:59pm UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341/4 "2022-01-17T17:59:05Z")

</div>

An in-place family like that may not have an associated Level parameter. Can you confirm?

---

<div class="post-metadata">

**Author:** ![zakim](https://avatars.discourse-cdn.com/v4/letter/z/e47774/32.png) [@zakim](https://forum.dynamobim.com/u/zakim)\
**Post date:** [January 17, 2022, 6:15pm UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341/5 "2022-01-17T18:15:36Z")

</div>

Hi @Nick_Boyts … Thanks - that might be the issue.  
The instance family created feels like it is “In Place” with not “Level” parameter. At the same time, the generic model can be edited externally in the Family Editor.

 ![TestCapture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/c/bca5240c31876ebd3c7748aa4c64040dd71dd639.jpeg)

What’s the best way to convert Dynamo geometry to level-hosted generic model?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [January 17, 2022, 7:30pm UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341/6 "2022-01-17T19:30:43Z")

</div>

You’d have to modify it in the family editor to be level based. Then you should be able to copy it.

---

<div class="post-metadata">

**Author:** ![Hamish](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hamish](https://forum.dynamobim.com/u/Hamish)\
**Post date:** [January 17, 2022, 7:58pm UTC](https://forum.dynamobim.com/t/element-copytolevel-error/72341/7 "2022-01-17T19:58:43Z")

</div>

I made a script a while ago to convert in-place models into standard families.

From memory I used that same FamilyInstance.ByGeometry node, got its location data and used that to determine an insertion point and level for a FamilyInstance.ByPointAndLevel node to make a new level hosted instance, then deleted the original instance made from that node (and the model in place).

The original converted instance would be like your snip above with no level host, but the new instance of the same family type placed with the ByPointAndLevel node had correct level hosting. No family edits required. It was a bit of janky method, so perhaps there are better out there. But it might work for your needs.
