Hi Chris @Anonymous
Private Sub CommandButton7_Click()
Dim plineObj As AcadLWPolyline
Dim pt() As Double
Me.Hide
pt = ThisDrawing.Utility.GetPoint(, "Pick lowerleft Corner")
ReDim Preserve pt(0 To 15) As Double
pt(3) = Val(TextBox63.Text)
pt(4) = Val(TextBox64.Text)
pt(5) = 0
pt(6) = Val(TextBox65.Text)
pt(7) = Val(TextBox66.Text)
pt(8) = 0
pt(9) = Val(TextBox67.Text)
pt(10) = Val(TextBox68.Text)
pt(11) = 0
pt(12) = 0 'pts(4)
pt(13) = 90 ' pts(5)
pt(14) = 100
Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(pt)
plineObj.Closed = True
End Sub
First of all, it's useful to use the same variable for coordinates, in order to avoid confusion, so I used getpoint return coordinates into pt variabile and then I used the same pt array variable with Redim Preserve option in order to maintain the coordinates obtained from Getpoint and assign text boxes contents for other array variable rows.
Delete all previously declaration and insert only Dim pt() As Double:
'Dim pts(0 To 5) As Double
'Dim Point(0 To 11) As Double
As second issue, the AddLightWeightPolyline require the coordinates array sized as multiple of three, otherwise you got an error, this is the reason due to I sized the array 0 to 15.
Finally I don't understand pts(4) and pts(5) so I inserted some random number, I guess they are coming from some other parts of code, in case check the declaration method.
See above the image result.