Data tree manipulation

Hello, I’m trying to place items from a data tree to another data tree by specific branch. Please look at attached picture, it should be more clear.
Thanks for help :slight_smile:


gh_question.gh (47.3 KB)


DATA.gh (55.5 KB)

1 Like

gh_question_answer.gh (54.8 KB)

hope that helps

Ben

1 Like

Thanks for responding but what I meant is to do that for every branch not only for specific one :slight_smile:

Thanks Ben, I have some problems with opening your file. This message comes up:
image

Can you copy text of the script here?

thats funny, because I use no plug-ins at all…have you the latest Rhino version?

sure:

private void RunScript(string x, DataTree<double> y, ref object a)
    {
        int i = Convert.ToInt32(x.Substring(1, x.Length-2));
        a=y.Branch(new GH_Path(i));
    }
2 Likes

@Maciobacio,

The plugin warning message is because @benedict is using the new R8 script editor and @Maciobacio, you are likely using R7 or and earlier version of R8.

2 Likes

Thank all of you guys for helping! :smiley: Ben’s solution is working.

1 Like