Grasshopper

algorithmic modeling for Rhino

Hi to all 

c#  coding 

Objects have the method: 

object.UserDictionary.Set("name", list<type> );

after that I can recall 

IEnumerator< KeyValuePair<string, object>> table = object.UserDictionary.GetEnumerator();

I have no idea on how to convert this IEnumerator to something usable 

to get back my list of data and found no example on the web. 

calling : 

table.MoveNext();   

and

 KeyValuePair<string, object> t =  table.Current();

i get a  error 

--> table.Current() is not callable 

So I made a cast to a Dictionary on the IEnumerator

but this raises a exception <bad cast> when I execute the program

Does anybody out there have a snippet ? 

I am absolutely a  newbie with  c#  coding 

thanks

gerry 

Views: 1265

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service