June 9, 2016, 10:48pm
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.
June 9, 2016, 11:52pm
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.
June 10, 2016, 12:05pm
I was trying to find the object.location , but now I understand that what I need is the BoundingBox.
Split this topic
January 29, 2020, 2:56pm
June 22, 2020, 6:11am
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…
June 22, 2020, 11:06pm
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.