Advertisement
Guest User

SortByList

a guest
Jun 5th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. import clr
  2. clr.AddReference('ProtoGeometry')
  3. from Autodesk.DesignScript.Geometry import *
  4. #The inputs to this node will be stored as a list in the IN variables.
  5. dataEnteringNode = IN
  6.  
  7. list=IN[0]
  8. key=IN[1]
  9.  
  10. a=[]
  11. for x in key:
  12.     b=[]
  13.     for y in list: 
  14.         if x == y:
  15.             b.append(x)
  16.     a.append(b)
  17. OUT = a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement