How to access to each tree

Hi everyone

I am new to ghpython and I have a simple question. How can I access to a branch of data in ghpython. This is my code:

import rhinoscriptsyntax as rs

lines = rs.AddLine(x,y)
a = rs.DivideCurve(lines,10, False, True)

In this screenshot you could see that ’ a ’ has an output in two different branches. I want to choose the first branch inside the python code.

I just happened to stumble on to this…

http://www.chenjingcheng.com/grasshopper-add-on-component-conversion-between-python-list-and-datatree/

Thank you for the code
But I didnt manage to use it. It gives an error.
when i
print a
it does not show a nested list and it only shows the last list.

Hi @alexholden18

It would help if you could tell us, what you are trying to do.

Thanks,

Giulio

2 posts were split to a new topic: Branch from the tree using GHPython