Hi everyone,
I am trying to iterate through the a list, and this list can have any number of items. In my example, as you can see below i tried to iterate through the list with no luck and i am getting the error of
"
IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 15, in
TypeError: unsupported operand type(s) for +: ‘int’ and ‘list’"
the code I used to iterate inside pythonscript is:
Enable Python support and load DesignScript library
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.
l= IN
s=l
sum1 = 0
a=
for x in s:
sum1 =sum1 + x
a=sum1
Assign your output to the OUT variable.
OUT = a
Any ideas on how to solve this ?
Many thanks in advance