Grasshopper

algorithmic modeling for Rhino

I'm wondering what is the difference between String type data with GH_String type data. I tried to used it in C# with the same script, but I get completely different result.

My script worked in String type but not in GH_String. Besides, i need to declare the variable in GH_String somehow.

Well, it's in the if condition:

List<GH_String> inputlist = new List<GH_String>();

for (int i = 0; i < inputlist.Count; i += 5)
{ if (!inputlist.GetRange(0,i).Contains(inputlist[i])) {...}}

In GH, for example I set i=apple; seems like it doesn't want to read the data "apple", but the item only "inputlist[i]".

Views: 501

Replies to This Discussion

GH_String is IGH_GOO,string is a general class!

eg:

string str="Panda";

GH_String gh_string=new GH_String(str);

string new_str=gh_string.Value;

nice, thanks Panda

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service