Hi all
I’m a new in Rhino in python
I have a list of objects that I selected in rhino.
I wanna store the selection list and later on select it from python
the thing is when I use Get.object it give me the simple guid that I want “[xxxxxxx]”
but when I use the Get.objects it gives me diffrent thing like “system.guid object at [xxxxx]”
I want to get the simple guid like first one [xxxxxxxxxxx]
so later on I can import to object select to re select it by python.
GetObjects() returns a list of GUID’s - as it can return multiple objects. You will need to learn a little about lists in Python and how to access the items inside.
They are the same - when you print a list you get the repr representation of the object and when you print the object you get the str representation. Try this with some objects selected:
from __future__ import print_function
import rhinoscriptsyntax as rs
objs = rs.SelectedObjects()
print ("LIST: ", objs)
for obj in objs:
print ("STRING:", obj)
print ("REPR: ", repr(obj))