Option Explicit 'Script written by Russell Loveridge 'Script copyrighted by Call Cubit() Sub Cubit() 'declare the variables for the script. Dim strObject, dblSize Dim arrCorner(7) dblSize = Rhino.GetReal("Input the Size of the box", 2) If (VarType(dblSize) = vbNull Or (dblSize <= 0)) Then Exit Sub ' Below is an array - a list of points. ' These points define the corners of a box (2units x 2units x height) ' the centre of the base of the box is 0,0,0 arrCorner(0) = Array(-1,-1,0) ' this is the first corner = lower left corner arrCorner(1) = Array(1,-1,0) ' corner 2 arrCorner(2) = Array(1,1,0) ' corner 3 arrCorner(3) = Array(-1,1,0) ' corner 4 - the last corner of the bottom level... arrCorner(4) = Array(-1,-1,dblSize) 'this is the first corner on the top of the box arrCorner(5) = Array(1,-1,dblSize) 'top corner 2 arrCorner(6) = Array(1,1,dblSize) 'top corner 3 arrCorner(7) = Array(-1,1,dblSize) 'last top corner ' strObject is the temporary "identifier" for the box. strObject = Rhino.AddBox (arrCorner) ' AddBox is the command to create a box, it makes it with the corners defined in the array. End Sub