Identifying object from string

I have some objects stored in UserText in another object. These are saved as strings. How do I treat this a an actual object later on, when retrieving it from GetUserText, and not just a list of characters? I want to be able to traverse the object(s) with a for-loop.

Thank you!

Hello - is the string a GUID? If so and the GUID is valid - that is, there is an object with that GUID in the file, you should be able to get at the object - in plain Rhino SelID looks for a GUID-like string and in a script you can get at it - otherwise I need more info about what you are trying to do…


The object is placed in UserText by it’s identifier (53949a72-5059-4488-af9a-9114a6063531) and later retrieved as a GUID ([<System.Guid object at 0x0000000000004BEE [53949a72-5059-4488-af9a-9114a6063531]>]). However, when called (rs.GetUserText(objekt, “Motsats”, False)), len() returns numbers of characters (83), and when trying to select the object, it returns the error message “Parameter must be a Guid or string representing a Guid”.

hello - you can make it into a GUID from the string,

import System
myID = System.Guid('53949a72-5059-4488-af9a-9114a6063531')

Does that work for what you need?