Sub OpenDrawing() Dim LineObj As AcadLine Dim a As Variant Dim b As Variant Dim x(2) As Double, Y(2) As Double Dim xx(2) As Double, yy(2) As Double x(0) = 10: x(1) = 10: x(2) = 0 Y(0) = 50: Y(1) = 50: Y(2) = 0 Set LineObj = ThisDrawing.ModelSpace.AddLine(x, Y) a = LineObj.StartPoint b = LineObj.EndPoint xx(0) = a(0): xx(1) = a(1) yy(0) = b(0): yy(1) = b(1) MsgBox "xx=" & xx(0) & " xx=" & xx(1) MsgBox "yy=" & yy(0) & " yy=" & yy(1) End Sub |