Hi, I wrote some code but it doesn't work. What I want to acomplish is that by the user typing in one # into a text box, this would automatically insert a rectangle into model space, by the same width all the time. so if you type in 20, this would automatically draw a rec that's 20 by the default 100 number. If you type 50, it would draw a rec that's 50 by 100. So far i have this code; Can someone help!
Private Sub cmdDim_Click()
Dim line As AcadLine
Dim ob
ob = ThisDrawing.ModelSpace.AddLine
line.StartPoint = txtDim.text
line.EndPoint = 100
End Sub
Private Sub cmdDim_Click()
Dim line As AcadLine
Dim ob
ob = ThisDrawing.ModelSpace.AddLine
line.StartPoint = txtDim.text
line.EndPoint = 100
End Sub