Python - Get Line From List (Line,Arc,...)

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# The inputs to this node will be stored as a list in the IN variables.
listA = IN[0]
if isinstance(listA, list):
	listA = UnwrapElement(listA)
else:
	listA = UnwrapElement([listA])
curve = []
for i in listA:
	if i.GetType().ToString() == "Autodesk.DesignScript.Geometry.Line":
		curve.append(i)	
OUT = curve 
1 Like