Update object when another object changes

Is there a way to link two objects, so that when one object changes another changes, as well? That is have some code run only on that object change (when it’s moved, scaled, changed material, changed layer, split into two objects, deleted, etc.)

I imagine tagging that object either in its name field or Object User Text.

I’m trying to replicate Rhino’s blocks. I’ve seen some snippets that used RhinoApp’s Events system, but I’m not experienced enough to use it or judge whether it would work in this scenario.

Any hints, comments or external validation will be greatly appreciated.

events in this class will be more relevant
you’d wanna listen to those on the ActiveDoc instance of course
RhinoDoc Class (rhino3d.com)
for example the modify attribute event will give you this
RhinoModifyObjectAttributesEventArgs Class (rhino3d.com)
you can backtrace what object it is in the RhinoObject property and see if this is the object that you wanted to trigger rippling changes in others

1 Like