How to Access Real Rhino GUIDs in Grasshopper Python Scripts

Hi! I’m encountering an issue in Grasshopper where the GUIDs received in my Python script appear to be temporary, specific to Grasshopper, rather than the actual Rhino object GUIDs. This prevents me from manipulating these objects directly in the Rhino context, such as performing scaling operations. Could anyone guide me on how to retrieve the real Rhino GUIDs for objects within a Grasshopper Python script? Any assistance or resources would be greatly appreciated. Thank you!

Do any of the new Rhino components make this easier?

In this situation I assume that the user of the component wishes to make operations on the Grasshopper Geometry. That’s why they connected it to my component.

If the users want the real Rhino Geometry, rs.ObjectsByType etc. can return the relevant real Rhino guids (I provided another compoennt that does exactly this). I can’t remember if they require sc.doc = Rhino.RhinoDoc.ActiveDoc or not. The returned results can be filtered by layer and selection. There are others in rs too that prompt the user to pick a Rhino object, but I’ve not tried them.

if you need real guid, then use the guid component, right-click → set guid

1 Like

This is covered in this thread:

1 Like