Hi All,
I’ve been using the UserDictionary / ArchivableDictonary to store attributes with geometry, and it has been working great. I’ve been storing information via components I developed in Grasshopper as well as through a UI I put together in rhino. But I’ve run into an issue. When I change the material color of the geometric element, the attributes get erased / lost. I discovered this when I ran a python script on the geometric elements to change the material color. Has anybody ran into an issue similar to this? How could I resolve this problem? Am I doing something wrong?
It’s possible to store data on the geometry (inherits form GeometryBase), and on the object that represents the geometry (inherits from RhinoObject).
Could it be that this your information is stored on the wrong object?
Thanks for your reply. If I understand correctly, the code I’m using applies the attributes to the geometry. The snippet is below: Dim NewGuid As Guid = Doc.Objects.Add(RHGeo, RhAtt)
Aha, I see. You are storing the data on the object, and not on the geometry. You should also be able to store it on the RHGeo instance. Maybe then it will remain after changing the material color.