Moves a single object.
rhinoscriptsyntax.MoveObject (object_id, translation)
rhinoscript.object.MoveObject (object_id, translation)
object_id |
Required. String or Guid. The identifier of the object to move. |
translation |
Required. list of 3 numbers or Vector3d. The 3-D translation vector. |
Guid |
The identifier of the moved object if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
id = rs.GetObject("Select object to move")
if id:
start = rs.GetPoint("Point to move from")
if start:
end = rs.GetPoint("Point to move to")
if end:
translation = end-start
rs.MoveObject(id, translation)