PlaneFitFromPoints

I’m trying the rs.PlaneFitFromPoints function.
Using the example in the RhinoPython Help:

    import rhinoscriptsyntax as rs
    points = rs.GetPoints()
    if points:
        plane = rs.PlaneFitFromPoints(points)
        if plane:
            magX = plane.XAxis.Length
            magY = plane.YAxis.Length
            rs.AddPlaneSurface( plane, magX, magY )

an error occurred:
Message: ‘type’ object has no attribute 'index
Traceback:
line 402, in coerce3dpointlist, "C:…\utility.py"
line 119, in PlaneFitFromPoints, "C:…\plane.py"
line 5, in , “C:…\TempScript.py

Hmm, your code snippet above seems to be working here… --Mitch

Thanks Mitch. Using the WIP is all good. I’ll try to restart Rhino.
Bye,
g

Ok, Rhino 5 works too.