Polycurve list

Hi,

I’m trying to create a list of polycurves using Python.
For some reason the PolyCurve command won’t accept the points.

error is :
TypeError: expected IEnumerable[Point], got Point

Hello Dennis,

You will have to give it what it is asking for, System.Collections.Generic

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('System')
from System.Collections.Generic import List

points = List[Point]()
points.Add(Point.ByCoordinates(0,0,0))
points.Add(Point.ByCoordinates(0,500,5000))

OUT = PolyCurve.ByPoints(points)
1 Like

thanks for your quick reply Einar !
That did it.