我收到带有以下代码的以下错误消息。我不确定这是否与 Grasshopper 内核有关,或者我没有DataAccess.GetDataList()
正确编写方法。我希望你能帮忙。
The type arguments for method 'Grasshopper.Kernel.IGH_DataAccess.GetDataList<T>(int, System.Collections.Generic.List<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
代码:
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
pManager.AddTextParameter("SomeString", "SS", "Send Some String Somwhere", GH_ParamAccess.list); //0
}
protected override void SolveInstance(IGH_DataAccess DA)
{
string SomeString = default(string);
DA.GetDataList(0, ref SomeString);
if (!DA.GetDataList(0, ref SomeString)) return;
}