Orients a single object based on input points.
Rhino.OrientObject (strObject, arrReference, arrTarget [, intFlags])
strObject |
Required. String. The identifier of the object to orient. |
||||||
arrReference |
Required. Array. An array of 3-D reference points. If two 3-D points are specified, then this method will function similar to Rhino's Orient command. If more than two 3-D points are specified, then the function will orient similar to Rhino's Orient3Pt command. |
||||||
arrTarget |
Required. Array. An array of 3-D target points. If two 3-D points are specified, then this method will function similar to Rhino's Orient command. If more than two 3-D points are specified, then the function will orient similar to Rhino's Orient3Pt command. |
||||||
intFlags |
Optional. Number. The orient flags. Values can be added together to specify multiple options.
|
String |
The identifier of the oriented object if successful. |
Null |
If not successful, or on error. |
Dim strObject, arrReference, arrTarget
strObject = Rhino.GetObject("Select object to orient")
If Not IsNull(strObject) Then
arrReference = Rhino.GetPoints(,,"First reference point")
If IsArray(arrReference) And (UBound(arrReference) > 0) Then
arrTarget = Rhino.GetPoints(,,"First target point")
If IsArray(arrTarget) And (UBound(arrTarget) > 0) Then
Rhino.OrientObject strObject, arrReference, arrTarget
End If
End If
End If