I am trying to, given an object, find the name of the layer that object is in in the rhino document. I found that i can use
rs.ObjectLayer(obj) for this. However, when i try to use it i get this error:
Runtime error (TypeErrorException): Parameter must be a Guid or string representing a Guid
The reference to the object (what im using as
obj), when i print it, is something like this:
<Rhino.Geometry.Brep object at 0x0000000000000F03 [Rhino.Geometry.Brep]>
(the hexadecimal code changes everytime the code is run). I have been doing some research and it appears that this is not what a guid looks like. When using
rs.GetObject() and printing the returned value, i get an guid like this:
How can i find the layer of the object using the reference i have for it?
How can i get the guid for the object so i can use
Thanks in advance!