generative modeling for Rhino
I am wondering how to do the following: I have a custom textbox attached to my component. I now want to save the textbox s text value to the Grasshopper file so if the file is closed and then reopened the last entered text appears in the box.
Ive set it up in the following order - however, the variable name seems to be null when the attributes override is called. How would one go about it to achieve the above mentioned?
Thanks a lot in advance!!!
public class Component : GH_Component
public string name;
public override bool Write(GH_IO.Serialization.GH_IWriter writer)
public override bool Read(GH_IO.Serialization.GH_IReader reader)
name = reader.GetString("prjname");
MessageBox.Show("project name: " + name.ToString());
public override void CreateAttributes()
CustomTextbox txt = new CustomTextbox (name);
So 'name' deserializes correctly, but 'new CustomTextbox(name);' fails?
What is CustomTextBox?