I’m trying to script ‘BranchCount’ but it’s not working, what am I doing wrong?
I am not able to count the branches and return 0, 1, 2. Later on I want also to get the branches printed including the items like in Grasshopper is shown in a panel.
Yes, or at least that’s how I usually go about things (and recommend to others) i.e. to decouple the core classes/functions/code within a GHPython component entirely from the Grasshopper API (implementing usually just RhinoCommon.Geometry), and then wrap the output data in the appropriate Grasshopper.Kernel.Types (if outputting a lot of data) and in a DataTree where appropriate/needed. Giulio even added his read/write DataTree functions to GHPython in Rhino 6 for the latter.