I'm trying to achieve a 3D Array using a loop within a loop with the insert block method without much success.

The code below produces just one column, which appears to be just working for the "i" loop.
Any ideas as to how to get the "j" loop working?



Private Sub CommandButton1_Click()

Dim ObjRef As AcadBlockReference
Dim Pnts(0 To 2) As Double
Dim PathName As String
PathName = "C:\Temp\Myblock.dwg"

For i = 0 To 1000 Step 300
    For j = 0 To 800 Step 200
        Pnts(1) = j: Pnts(1) = 0: Pnts(2) = i:
        Set ObjRef = ThisDrawing.ModelSpace.InsertBlock(Pnts, PathName, 1, 1, 1, 0)
    Next j
Next i

End Sub