Hi. I have 2 lists as inputs to a Python Script node in dynamo. The first list is a list of duct connector orientations (“in” or “out”). The second list is a list of the system abbreviation that the connector is a part of (“SA”, “RA”, “EA”, or “OA”)
.I need a python script that compares the item at Index[1] from input 1 against index[1] from input 2, but I’m having a hard time figuring it out. Here’s what I have. It tells me line 15 (the ‘if’ statement) is wrong - traceback error - but I have no clue how to rewrite it.
Any help would be greatly appreciated!
# 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.
dataEnteringNode = IN
Nodes = IN[0]
System = IN[1]
a=[]
# Place your code below this line
for i in Nodes and System:
if System[i] == "In" and (System[i] == "SA" or System[i] == "OA"):
a.append(1)
else:
a.append(0)
OUT = a