Copies one or more objects from one location to another, or in-place.
rhinoscriptsyntax.CopyObjects (object_ids, translation=None)
rhinoscript.object.CopyObjects (object_ids, translation=None)
object_ids |
Required. Array. An array of Guids identifying the objects to copy. |
translation |
Optional. list of 3 numbers or Vector3d. The 3-D translation vector. |
list |
A list of Guids identifying the copied objects |
import rhinoscriptsyntax as rs
objectIds = rs.GetObjects("Select objects to copy")
if objectIds:
start = rs.GetPoint("Point to copy from")
if start:
end = rs.GetPoint("Point to copy to", start)
if end:
translation = end-start
rs.CopyObjects( objectIds, translation )