这个可以用getpoint方式来显示这种效果,如下:
Sub test() Dim pnt1 As Variant Dim pnt2 As Variant Dim lineobj As AcadLine pnt1 = ThisDrawing.Utility.GetPoint(, "first point") pnt2 = ThisDrawing.Utility.GetPoint(pnt1, "second point") Set lineobj = ThisDrawing.ModelSpace.AddLine(pnt1, pnt2) ZoomAll End Sub