I can’t find List.Contains node and don’t know why. I thought it was part of spring nodes but is not there. Any idea what package am I missing?
I tried the OOTB node but it does not do the same. I’m trying to see if items of list 1 exist in list 2.
I can’t find List.Contains node and don’t know why. I thought it was part of spring nodes but is not there. Any idea what package am I missing?
I tried the OOTB node but it does not do the same. I’m trying to see if items of list 1 exist in list 2.
try copy pasta this in a python node.
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.
OGList= IN[0]
ListCompare = IN[1]
Output = []
missedtemp = []
missed = []
for Item in OGList:
for ItemCompare in ListCompare:
if Item == ItemCompare:
Output.append(True)
elif Item != ItemCompare:
missedtemp.append(False)
if len(missedtemp) == len(ListCompare):
Output.append(False)
missedtemp.Clear()
#Assign your output to the OUT variable.
OUT = Output
Also i think the package you’re looking for is called Ampersand