I would like to suggest an improvement to
While writing this little menu: Navigation plugin - #4 by kitjmv, I needed to sync a list of names of the named construction planes.
RhinoDoc has events for objects, instances, materials, groups, … and even lights, but nothing for construction planes.
I couldn’t find any way to listen to add, delete or modify.
So I had to run an infint loop on the Idle event to compare my list with
RhinoDoc.NamedViews. (knowing that the changes on this table are not frequent).
the same problem exists with named views.
I think events for this type of items should exist in the API.
The RhinoDoc.DocumentPropertiesChanged event will be invoked when the Named CPlanes or Named Views are changed. You still need to track the names and any other data yourself, but this will at least save you from running during the Rhino idle event.
There’s an issue opened here already that covers this request.
Thanks, I must have made a mistake because I had tried this event. So I will test this solution and come back here to tell you.
And it is true, it would be nice if the
Document EventArgs class had a property indicating why this event was thrown. That said, in my case it’s not essential, I rarely have more than twenty named construction planes defined.
Works well and it’s a better implementation, thanks.