The supplied data could not be converted

Hey,I’m try to write some plug-in for grasshopper in v6,but now I meet a problem,Here is my code,Some errors have been generated in grasshopper shows that parameter type is GH_Curve,but my type is List`1

protected override void SolveInstance(IGH_DataAccess DA)

        Surface S = new carapax_surface();
        int u = 0;
        int v = 0;
        List<double> u_list = new List<double>();
        List<double> v_list = new List<double>();

        List<Curve> u_curve = new List<Curve>();
        IList<GH_Curve> GHuCurve = new List<GH_Curve>();

        if (!DA.GetData(0, ref S)) return;
        if (!DA.GetData(1, ref u)) return;
        if (!DA.GetData(2, ref v)) return;

        Interval U = S.Domain(0);
        Interval V = S.Domain(1);

        u_list=calculate.Arithmetic_list(U, u);

        for (int i = 0; i < u; i++)
            GH_Curve C = new GH_Curve(S.IsoCurve(0, u_list[i]));
        DA.SetData(0, GHuCurve);

I guess You need to change the last line of your code to something like this:

DA.SetDataList(0, GHuCurve);
1 Like

LOL,thanks,problem solved