Find GUIDs of Rhino Data

Hello,
I need a script for grasshopper. I would appreciate if you can help.
What I want to do is that I want to access the GUID of Rhino data in a curve that I will define in grasshopper.
Is such a workflow possible?

the top guid was obtained by right-click-> set on guid → selecting the circle

as you can see, getting the curve from rhino first and passing it to a guid component also gets its guid

Hello,
Thank you for your answer. But, my problem is not the GUID information of an object but the GUID information of the objects inside that object. When there are too many of them, I want to do this in a script based way, not manually.

Currently I have found a way that works for me, I reference the objects in Rhino with the help of elefront. Then I find the bounding box centers of these objects. Then I query whether these center points are inside the curve I want.
I would be appreciated if anyone has a more logical idea or can solve this with script.

Iterating through all bounding boxes seems a good approach.

Use your curve to create the first box “B”, then iterate through all document geometries and get their bounding boxes and use the B.Contains() method to quickly see if the geometry is inside or not.
(note the a flat curve will generate a “flat box”, you might want to increase its Z thickness to avoid errors…)
(boxes are made by 3 “Interval” objects, which again have a similar method: .Include)

Other than that there are 2 methods for the document:
RhinoDocument.Objects.FindByWindowRegion()
RhinoDocument.Objects.FindByCrossingWindowRegion()
but are more complex to use via script…

Are you in rhino 8?

@maje90 thank you for your suggestion.

@scottd no, i’m using Rhino7. In version 8, I didn’t see the dynamism-fluidity (I don’t know how to put it in exact words :slightly_smiling_face: ) of version 7.