When is the GUID of the object created?

Hi all,
I have a question about GUID of the object.
When exactly is the GUID created? When it is added to the document?

I mean, when I create a bounding box (by Rhino.Geometry) I can’t keep track of it by GUID until I add it to the doc (for example by ToBrep() function and sc.doc.Objects.AddBrep()?

If I want to create multiple boxes and don’t want to show them in the document but test them for inclusion of points, it is sufficient to create them as Rhino.Geometry, but I can’t keep track of them by GUID but have to use simple list of these boxes. Is that right?

Thanks,
Tomas

That is essentially correct. The only way you can keep track of geometry that has not been added to the document is by storing it in a unique variable or an item in a list of variables.

–Mitch

Thanks Mitch

Isnt it possible to do something like this in rhinoscript:

Dim GuidObject1 = sc.doc.Objects.AddBrep()

Because it works on rhinocommon.

Jordy,
by this, you actually add the geometry to the document (and get the GUID). I mentioned that in my first post…