algorithmic modeling for Rhino
Hi Guys,
I'm new in programimg and have some problems with probably basic things...
I have imported a Tree of Integers into my component and now I want to get the number of branches...how can I get it...
so for example...
pManager.AddIntegerParameter("Plate point indexes", "I", "insert Tree with plate point indexes (4Points/Branch)", GH_ParamAccess.tree)
Dim plIndex As GH_Structure(Of GH_Integer)
How to get number of branches in plIndex?
plIndext.Count...doesn't work... It should be something similar? Please, help.
If I want x Item in Y Branch...code is.. =plIndex.Branch(Y).Item(X) ? Am I right?
Regards,
Damir
Tags:
You want to reference "Paths"
Hi Damir,
Can not help you with vb syntax, but you can check for the Count property of your GH_Structure.Branches value list.
Also PathCount property of GH_Structure. Number of paths should correspond to the number of branches (even if you have empty branches).
I do not codified in VS, but since grasshopper would be:
Dim tree as Datatree (of integer)
Dim bc as integer = tree.BranchCount 'Return the number of paths.
Thank you all for suggestions,
I will try to fix it...
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by