I’m not sure if Grasshopper’s bake action gives you the opportunity to specify Guid. However you can “bake” straight from GhPython.
You need to get to the ObjectTable of the current RhinoDoc, call the appropriate add method such as this one, then provide an ObjectAttribute whose ObjectId property is set to your desired Guid.
Of course remember to switch scriptcontext.doc from ghdoc to ActiveDoc and back.
The VB example is to create Guids for other purposes. Rhino takes care of Guid creation for you, and you cannot choose the Guid of the added object. However, once the object is added to the document, Rhino informs you of the Guid value that it assigned to the geometry. Example:
Just to be sure: You can choose the Guid of the added object, like i’ve shown in the linked example from an older thread above, by setting the Atrributes.ObjectId property and adding to the RhinoDoc with Attributes.
If the Guid assigned doesn’t really matter and just holding on to it is important, I agree @Will_Wang’s solution is the way to go.
The universe as we know it will suddenly cease to exist as the second GUID tries to materialize in the same space/time as the first, creating a gigantic GUID-AntiGUID explosion…