Trying to convert doubles to integers using another list of strings.
I’m getting this error:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 16, in
TypeError: Multiple targets could match: int(type, IList[Byte]), int(type, object), int(type, Extensible[float])
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.
typeInput = IN[0]
valueInput = IN[1]
valueOut = []
# Place your code below this line
for i in range(len(typeInput)):
if typeInput[i] == "Integer":
valueOut.append(int(valueInput[i]))
else:
valueOut.append(valueInput[i])
# Assign your output to the OUT variable.
OUT = valueOut