C# Visual Studio Data Trees


This is my first time using data trees in c# so im getting a bit confused. I have created two components that connect to each other using classes and constructors only sending integer vales. So what I want to know is;

the components will consists of trees and non trees so will need to set up the constructor to allow that

  1. How do I set up my constructor for DataTrees
  2. How do i set up my SolveInstance
    -DA.SetData(0, constructor)
  3. On component it connects to how do I read the data as right now ive been using this
    Grasshopper.Kernel.Types.GH_ObjectWrapper forces = new Grasshopper.Kernel.Types.GH_ObjectWrapper();
    and then doing
    var _forces = forces.Value as XXXXX.XXXX.XXX
  4. loop through each index of the tree {0,0},{0,1},{0,2} etc

Hope this is clear


Iā€™m not a developer, but you may find this useful.


1 Like