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.
Rhino.ReplaceGeometry (strTarget, strSource [, blnDelete])
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). |
String |
The identifier of the target object if successful. |
Null |
If not successful, or on error. |
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