CopyObject

Copies a single object from one location to another, or in-place.

Syntax

rhinoscriptsyntax.CopyObject (object_id, translation=None)

rhinoscript.object.CopyObject (object_id, translation=None)

Parameters

object_id

Required.  String or Guid.  The identifier of the object to copy.

translation

Optional.  list of 3 numbers or Vector3d.  The 3-D translation vector.

Returns

Guid

The identifier of the copied object if successful.

None

If not able to copy

Example

import rhinoscriptsyntax as rs

id = rs.GetObject("Select object to copy")

if id:

    start = rs.GetPoint("Point to copy from")

    if start:

        end = rs.GetPoint("Point to copy to", start)

        if end:

            translation = end-start

            rs.CopyObject( id, translation )

Also See

CopyObjects