How to get GUID from selected object

Hi!

I have been wondering how I can get GUID from selected object by python.
Please tell me how.

Thank you!

Hi Obara,

Does this help?:

import rhinoscriptsyntax as rs

selected = rs.SelectedObjects()
if selected:
    for obj in selected: print obj

-Willem

1 Like

…and if you need an actual text string, you can just use str(obj) or run the returned guid through a .format statement. --Mitch

1 Like