# Place family workplane problem

**URL:** <https://forum.dynamobim.com/t/place-family-workplane-problem/18811>\
**Category:** Uncategorized\
**Created:** [February 5, 2018, 8:48pm UTC](https://forum.dynamobim.com/t/place-family-workplane-problem/18811 "2018-02-05T20:48:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 5, 2018, 8:53pm UTC](https://forum.dynamobim.com/t/place-family-workplane-problem/18811/2 "2018-02-05T20:53:07Z")

</div>

You’ll either have to set the active work plane before running the script or specify the work plane in the creation of the family. The latter would likely use this method: [http://www.revitapidocs.com/2018/be4b822c-829a-7e7b-8c03-a3a324bfb75b.htm](http://www.revitapidocs.com/2018/be4b822c-829a-7e7b-8c03-a3a324bfb75b.htm)

```
import clr
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
from Revit.Elements import *
clr.AddReference('System')
from System.Collections.Generic import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
symbol = UnwrapElement(IN[0])
refPlane = UnwrapElement(IN[1])
location = UnwrapElement(IN[2])
referenceDirection = UnwrapElement(IN[3])
out = []

symbol.Activate()
reference = Reference(refPlane)

TransactionManager.Instance.EnsureInTransaction(doc)

new = doc.Create.NewFamilyInstance(reference,location.ToXyz(),referenceDirection.ToXyz(),symbol)

TransactionManager.Instance.TransactionTaskDone()

#Assign your output to the OUT variable.
OUT = new
```

---

_[View the full topic](https://forum.dynamobim.com/t/place-family-workplane-problem/18811)._
