Any native way to find Custom.UserData from a deleted object?

Hello forum,

So, I was wondering if there is a way to extract my Custom.UserData from a deleted rhinoobject, if I still have the Guid.

From what I understand, Rhino does not actually delete this object from the document until you “Purge” it. So, I was wondering if there is a way for me to retrieve this Data.

An alternative would be maybe an event that acts as a “BeforeDelete” or something like that, but I’m pretty sure this is not available.

Thanks for your insights!

Update:

I found out how!

To retrieve Custom.UserData from a deleted rhino object, one must use the doc.Objects.Find(), instead of looking for th Guid. And the input to this method, must be the Run Time Serial Number, which in my case was passed through the RhinoDoc.DeleteRhinoObject event, to which I subscribe.

Hope someone finds this helpful!

1 Like