OK, so I have been working through getting my dynamo graph into python because I would like to see if it solves faster than all the dynamo nodes. @colin.mccrone I am borrowing (with commented attribution) some of your work and I thank you very much for the sort and group nodes in Ampersand, I use them often.

My issue is when Trying to create a level plane the post subject is my error. I have tried many different ways of getting a point or XYZ although none seem to be working. Any assistance would be greatly appreciated.

I have tried .ToPoint() and no luck

```
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
import Autodesk
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
rLevel = []
levelElev = []
roomGroups = []
levelGroups = []
levels = []
levelPlane = []
rooms = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).WhereElementIsNotElementType().ToElements()
for r in rooms:
rLevel.append(r.Level)
levelElev.append(r.Level.Elevation)
#from Colin McCrone's Ampersand Package
def ListGroupByKey(data,criteria,toSort):
bins = []
bins.append(criteria[0])
sorted = []
sorted.append([])
for i in range(1,len(criteria)):
if criteria[i] in bins:
continue
else:
bins.append(criteria[i])
sorted.append([]) #initialize an empty list
if toSort:
bins.sort()
#Sort data into bins
for i in range(len(criteria)):
for j in range(len(bins)):
if criteria[i] == bins[j]:
temp = sorted[j]
temp.append(data[i])
sorted[j]=temp
continue
return sorted, bins
roomGroups = ListGroupByKey(rooms,levelElev,True)[0]
levelGroups = ListGroupByKey(rLevel,levelElev,True)[0]
#TransactionManager.Instance.EnsureInTransaction(doc)
for l in levelGroups:
levels.append(l[0])
lPoint = Autodesk.Revit.DB.XYZ(0,0,l[0].Elevation)
levelPlane.append(Plane.ByOriginNormal(Vector.ZAxis,lPoint))
#TransactionManager.Instance.TransactionTaskDone()
# Assign your output to the OUT variable.
OUT = roomGroups[0],levelPlane,levels
```

I hope I am missing something obvious and I get to look like a donkey.

At the moment I will cut and run, use the Level.Plane node and get back into python after that.