I’m creating 3D text using the TextObject command, then I want to move it.
I use LastCreatedObjects and I have the GUID.
Now what? How do I get an object based on that GUID, or alternatively, how do I find the current position of an object based on GUID?
You might use one of the coerce… functions:
Unless your object is a block, rhino objects do not maintain a readable position value (or some kind of origin). But you could get the bounding box center or an area centroid.
Can you elaborate or link to documentation? I can’t really find anything about these “Coerce” functions. Where are they? Why are the called that ?
those functions are not listed in the python helpfile yet, but you can read about their required arguments and description if you just start typing them in the Rhino Python editor like
rs.coerce… (Under Windows).
Alternatively you might take a look what each of the functions does in the
utility.py file which should be located here:
Also note my reply to your other post
here. Maybe you can just create the TextObject at the right position to prevent that it has to be moved at all ?
Why do you need the object? Most rhinoscriptsyntax methods work directly with the object’s GUID. For most of those methods, the GUID
IS the object for all intents and purposes.
As Rhino objects do not have a built-in reference point, the “current position” is some chosen point on the object, its bounding box center or some other critera that you have to define and extract.
I was trying to find the object.location , but now I understand that what I need is the BoundingBox.
Hi, then how cani get object’s GUID say from a 3d point?
don’t want to use rs.GetObject(“Select object”) as you have to literally pick up a point…
Only Rhino objects that you have added to the document have UUIDs. The points you pick on the screen using GetPoint do not have UUIDS, as they are just points.