Yes I would really like to do it…
The only things is I don’t know, I copied it from someone else on the forum. Python does not seem to have a regular flatten command. But after searching around again I found this:
So with the DSCore reference i could turn it in to this:
"""
LIST: Replacement of Dynamo IF node
"""
__author__ = Daniel Gijsbers
__version__ = '2.0.0'
# Enable Python support and load DesignScript library
import clr
clr.AddReference('DSCoreNodes')
import DSCore
from DSCore import *
# The inputs to this node will be stored as a list in the IN variables.
ToF = IN[0] # a boolean
List1 = IN[1]
List2 = IN[2]
Result = []
if ToF == True:
Result.append(List1)
else:
Result.append(List2)
# Making use of Design script for flattening
OUT = List.Flatten(Result,2) # The second input allows for the level of flattening<a class="attachment" href="//cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/9/0/90a184274093ef3954181ef961993ae1d8b8fdf8.dyn">DesignScripORPythonIFnode.dyn</a> (14.3 KB)