Sub AddMultiLine() On Error Resume Next Dim pt1 As Variant Dim pt2 As Variant Dim lineObj As AcadLine Dim Index As Integer Dim Length As Double pt1 = ThisDrawing.Utility.GetPoint(, "diem dau : ") Do pt2 = ThisDrawing.Utility.GetPoint(pt1, "diem cuoi: ") If Err Then GoTo KIRA Set lineObj = ThisDrawing.ModelSpace.AddLine(pt1, pt2) Length = lineObj.Length + Length Index = Index + 1 pt1 = pt2 Loop KIRA: MsgBox Index & " Line are created" MsgBox "Total Length is " & CStr(Round(Length, 3)) End Sub