RhinoPython Get GUID from Object

I guess this might be kind of stupid question, but I was not able to solve it.
I am creating Breps with Rhino Common in Python.
So far that works.
When I try to get them back into the rhinoscriptsyntax I am having trouble to get the GUIDs back.

This is what I got: <Rhino.Geometry.Brep object at 0x0000000000002FA2 [Rhino.Geometry.Brep]>
Any help or hints to the right documents are highly appreciated.


In order to get a GUID from your object you need to first add it to Rhino document:

import Rhino.Geometry as rg
import scriptcontext as sc
import rhinoscriptsyntax as rs
sphere = rg.Sphere(rg.Point3d(0,0,0), 10)
sphere_id = sc.doc.Objects.AddSphere(sphere)
rs.ScaleObject(sphere_id, [0,0,0], [2,2,2])
1 Like

@Mahdiyar first of all thank you.
I am a bit embarrassed to tell you why I acutally had that problem.
I did not assign the a variable when I added the object.
Thank you for the “eye-opener” :slight_smile: