/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { MeshClass mc1 = new MeshClass(); DA.GetData(0, ref mc1); DA.SetData(0, mc1.ID); DA.SetDataList(1, mc1.listOfElementID); DA.SetData(2, mc1.numberOfElements); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object can be used to retrieve data from input parameters and /// to store data in output parameters.</param> protected override void SolveInstance(IGH_DataAccess DA) { double number1 = 0; //inputs DA.GetData(0, ref number1); int id = Convert.ToInt32(number1); //create new object of class MeshClass mc1 = new MeshClass(id); mc1.listOfElementID = new List <int>() { 0, 1, 2, 3 }; mc1.numberOfElements = 15; //outputs DA.SetData(0, number1); DA.SetData(1, mc1); }