Problem with selecting path for the "Tree Branch" command in Python

Hi guys,

In the picture bellow the “bb = krefter” tree is shown in the panel to the left.
What do I need to put in the command x = gh.TreeBranch(bb, ???) to get the path (0,1)?

Berg - Mesh_v8_kurs.gh (23.4 KB)

You’ve renamed the default output a to the default input, x which is confusing

Usually GHPython scripts are of the form a = f(x).

Anyway, instead of using a GhPython component that only uses Node In Code, to call a virtual Grasshopper Compoent (that may not work, as there are too many to test and debug), as you’re in Grasshopper anyway, why don’t you place the actual Grasshopper component you want, that will work?

You even already have a Tree Branch component in there, you just haven’t set a path on it. When you have time you ought to read up, DataTrees but to get this working all you need is the syntax for a Path - it could be a simple as the string {0;0} or {0;1}. Similarly Grasshopper already provides a way to select a particular item from a list.

If you do want to do more advanced processing DataTrees, the treehelpers module is great. But that’s complete overkill (avoiding learning about Grasshopper) just to get a branch.