Option Explicit 'Script written by Russell Loveridge 'Script copyrighted by Call Main() ' This is the same as script 10 except it is LIMITED to copying UP in Z by fixing the value for intDir Sub Main() Dim strObject, dblSize, intDir, i, intCount, dblpos strObject = Rhino.GetObject( "Select an object to copy" ) If IsNull(strObject) Then Exit Sub dblSize = Rhino.GetReal("enter distance to copy the box", 2) 'I have commented out the user input (line immediately below), and have assigned intDir=2 = Z! 'intDir = Rhino.GetInteger("direction to move the box: X=0, Y=1, Z=2, all=3", 3, 0, 3) intDir = 2 ' this is HARDCODING the value of intDir... it is no longer a variable and will always be 2. intCount = Rhino.GetInteger("how many copies?") If (VarType(intCount) = vbNull Or (intCount <= 0)) Then Exit Sub ' we can use the user input value and multiply it by a random factor between 0 and 1. For i = 1 To intCount dblpos = (i*dblSize) ' note intDir has been FIXED to = 2 so it will always copy in Z. ' below is useless... it is a leftover from cut&past from the previous scripts. If intDir = 0 Then 'this is useless as intDir=2 is HARDCODED above Rhino.CopyObject strObject, Array(0,0,0), Array(dblPos,0,0) ElseIf intDir = 1 Then 'useless as intDir=2 is HARDCODED above Rhino.CopyObject strObject, Array(0,0,0), Array(0,dblpos,0) ElseIf intDir = 2 Then 'this is the only condition that will ever be called Rhino.CopyObject strObject, Array(0,0,0), Array(0,0,(dblpos*1.1)) Else 'useless.... as intDir=2 is HARDCODED above Rhino.CopyObject strObject, Array(0,0,0), Array(dblpos,dblpos,dblpos) End If Next End Sub