Orients one or more objects based on input points.
Rhino.OrientObjects (arrObjects, arrReference, arrTarget [, intFlags])
arrObjects |
Required. Array. An array of strings identifying the objects 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.
|
Array |
An array of strings identifying the oriented objects if successful. |
Null |
If not successful, or on error. |
Dim arrObjects, arrReference, arrTarget
arrObjects = Rhino.GetObjects("Select objects to orient")
If IsArray(arrObjects) 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.OrientObjects arrObjects, arrReference, arrTarget
End If
End If
End If