How can I get path info in grasshopper c#

If I have a datatree with path such as {A;B;C}(i), Is there a way I can deconstruct the path and store all the A,B,C data into seperated list in c#?

Hello,

Yes, if you are in Grasshopper C#, you have a DataTree, you can access the i-th path with tree.Paths[i]. This returns an array of integers, so you can do what you want with them.
If you are in VS, same thing with a GH_Structure.

1 Like

Screen Shot 030
Screen Shot 031

2 Likes

Hi magicteddy and Pfotiad0,
Thank you guys, that’s really helpful! I’ll try later!