I’m trying to convert a list into (x,y) where y is value in a list and x is the index number of parent list in which the value is present.
How can I get the value of x?
I’m trying to convert a list into (x,y) where y is value in a list and x is the index number of parent list in which the value is present.
It’s hard to help you when we can only see a small portion of the graph and aren’t given the list structure. From the picture it looks like the list has up to @L4 so you will need to either flatten or tweak this but this method should work (it does add the number in front of empty lists so if that is undesired then you will need to do another method of filtering):
Is there a DisignScript equivalent that you know of?
I’m not too good with DesignScript’s imperative syntax but python would be like this:
data = IN[0]
for i, v in enumerate(data):
if v != []: v.insert(0,i)
OUT = data
Sounds like a challenge to me
@Nick_Boyts That is exactly what I required.
Thank you.