Hi All,

This is not an easy question. So I hope I explain it well.

I have a tree (51 items in total) of a specific data structure which I had to flatten in order to copy 7 times along different vectors using a series. Now the structure of the new tree consists of 7 branches with each branch containing 51 flattened items. I would like to unflatten each new branch to the structure of the original tree with adding one number at the beginning at each unflattened branch that indicated the number of that item in the copied series (7 copies in this case). For example: if the original tree’s structure is a combination of these branches (1;0) and (2;0), I want the new tree structure for the 7 copies to be {0;1;0}, {1;1;0}, {2;1;0}…{6;1;0}, and {0;2;0}, {1;2;0}, {2;2;0}…{6;2;0}.

I was able to do this by exploding the tree branch consisting of flattened branches (i.e. {0},{1},{2},{3},{4},{5},{6}) then unflattering each tree and entwine them using graft option. Is there an alternative?

I hope the screenshots and description is sufficient, as I can’t share the script. Thanks in advance.