RufussMcGee
Technical User
Need help with VBA in Autocad, tell me to write a lisp routine and will have it for you. But when it comes to VBA just cannot figure out how to do things. For Example wrote this simple code...
Private Sub CommandButton1_Click()
Dim aline As AcadLine
Dim startPoint
Dim endPoint
Me.Hide
startPoint = ThisDrawing.Utility.GetPoint(Prompt:="Pick a point:")
endPoint = ThisDrawing.Utility.GetPoint(Prompt:="Pick a point:")
Set aline = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint)
aline.Update
End Sub
It draws a line when the user picks the two points. If I wanted to expand this in Lisp would write a simple code to offset the line one side then add an arc by either filettng the lines or just drawing the arc. But how do you do something as simple as that with VBA? Even if I could find a way to send information by user selection from VBA to my Lisp routine would be great. Does anyone have any advice?
Private Sub CommandButton1_Click()
Dim aline As AcadLine
Dim startPoint
Dim endPoint
Me.Hide
startPoint = ThisDrawing.Utility.GetPoint(Prompt:="Pick a point:")
endPoint = ThisDrawing.Utility.GetPoint(Prompt:="Pick a point:")
Set aline = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint)
aline.Update
End Sub
It draws a line when the user picks the two points. If I wanted to expand this in Lisp would write a simple code to offset the line one side then add an arc by either filettng the lines or just drawing the arc. But how do you do something as simple as that with VBA? Even if I could find a way to send information by user selection from VBA to my Lisp routine would be great. Does anyone have any advice?