Getting empty object Id from NewRhinoObject parameter

Created an extrusion in Rhino 7 and gets the ID for same and when we add a hole to that extrusion, the geometry turns into Brep geometry. resulting ReplaceRhinoObject event is triggered, providing ObjectId, OldRhinoObject, NewRhinoObject, and Document as parameters. However, we observed that in NewRhinoObject, the ID is empty, whereas in OldRhinoObject, the ID is present.

Whats the reason that is ID empty in NewRhinoObject during this process?

We tried with same object scaling that time also same event is triggered and got the same ID in NewRhinoObject & OldRhinoObject.

Attaching snapshots for more details.



I see the same when I use the MakeHole command, is that what you did as well?
It happens independent of the object being an extrusion or a polysurface.

I used the RoundHole command instead of the MakeHole command. The observed behavior occurred during the application of the RoundHole command.

The ID is empty in NewRhinoObject during the RoundHole command, Is it expected behavior?

I see that a bunch of Hole commands have this, MakeHole, RoundHole, mabye even more. You could subscribe to RhinoDoc.AddObject, RhinoDoc.DeleteObject and RhinoDoc.UndeleteObject to follow more closely what is going on, these are triggered with the correct object ID’s.

I’ve attempted to subscribe to the RhinoDoc.AddRhinoObject , RhinoDoc.DeleteRhinoObject , and RhinoDoc.UndeleteRhinoObject events, but they seem to provide the old Rhino Object Id. Since the geometry is changing from an Extrusion to a polysurface, is there a way to obtain the new Rhino Object Id?

This issue has been fixed and will appear in the upcoming service release 8 for Rhino 8, which is expected to be released mid June 2024.