Grasshopper

algorithmic modeling for Rhino

I made a Drop-down menu Component by VS,but when I change option,there are something wrong

Hi everyone

     I made a Drop-down menu Component by VS,but when I change option and save the file,next time when I open the file, the option is reseted(default). anyone can help me? thanks

(this is the screenshot)

Views: 258

Attachments:

Replies to This Discussion

You need serialize/deserialize the flag field. Something like:

Public Overrides Function Write(writer As GH_IWriter) As Boolean
writer.SetBoolean("Flag", Flag)
Return True
End Function


Public Overrides Function Read(reader As GH_IReader) As Boolean
Flag = reader.GetInt32("Flag")
Return True
End Function

thank your Daniel ,It works as your say!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service