ReplaceGeometry

Replaces the geometry of an object with that of another object. Note, the target object's attributes, such as it's object identifier, attribute user data, and other properties, are retained.

Syntax

Rhino.ReplaceGeometry (strTarget, strSource [, blnDelete])

Parameters

strTarget

Required. String. The target object, or the object geometry to replace.

strSource

Required. String. The source object, or the object geometry to replace with.

blnDelete

Optional. Boolean. Delete the source object. The default is not to delete the source object (False).

Returns

String

The identifier of the target object if successful.

Null

If not successful, or on error.

Example

Dim strTarget, strSource

strTarget = Rhino.GetObject("Select object to replace")

If Not IsNull(strTarget) Then

  strSource = Rhino.GetObject("Select source object")

  If Not IsNull(strTarget) Then

    Rhino.ReplaceGeometry strTarget, strSource

  End If

End If

Also See

CopyObject