Python userDictionary example

I can’t seem to find an example of how to set key, value pairs in the UserDictionary. Are there any?

Thanks,

Nathan

http://www.dotnetperls.com/dictionary-python

Ok, thanks to to this thread:

I got the hint I needed. This python way:

rObjectGeo.UserDictionary[‘key’] = ‘value’

Doesn’t seem to work for me. However this way:

rObjectGeo.UserDictionary.Set(‘key’, ‘value’)

Does.

We may be able to eventually support the syntax of

rObjectGeo.UserDictionary['key'] = 'value'

but it is going to take a bit of work and most likely won’t be available until V6. The UserDictionary has a large number of overloaded Set functions in order to only allow certain types to be added to the dictionary.

No problem with the way it is as long as you know that is the only way it works!