Option Explicit 'Script written by Russell Loveridge 'Script copyrighted by Call Main() Sub Main() Dim strObject, dblSize, intDir strObject = Rhino.GetObject( "Select an object to move" ) If IsNull(strObject) Then Exit Sub dblSize = Rhino.GetReal("enter MAXIMUM distance to move the box", 10) intDir = Rhino.GetInteger("direction to move the box: X=0, Y=1, Z=2, all=3", 3, 0, 3) ' we can use the user input value and multiply it by a random factor between 0 and 1. If intDir = 0 Then 'move in X Rhino.MoveObject strObject, Array(0,0,0), Array((dblSize*rnd),0,0) ElseIf intDir = 1 Then 'move in Y Rhino.MoveObject strObject, Array(0,0,0), Array(0,(dblSize*rnd),0) ElseIf intDir = 2 Then 'move in Z Rhino.MoveObject strObject, Array(0,0,0), Array(0,0,(dblSize*rnd)) Else 'move in all three axis at the same time..... Rhino.MoveObject strObject, Array(0,0,0), Array((dblSize*rnd),(dblSize*rnd),(dblSize*rnd)) End If End Sub