Open DirPath1 & "\XYZ.txt" For Input As #1 Do Until EOF(1) Input #1, xh, xyz(1), xyz(0), xyz(2) If l = 1 Then pt1(0) = xyz(0): pt1(1) = xyz(1): pt1(2) = xyz(2) Else pt2(0) = xyz(0): pt2(1) = xyz(1): pt2(2) = xyz(2) Set lll = ThisDrawing.ModelSpace.AddLine(pt1, pt2) pt1(0) = pt2(0): pt1(1) = pt2(1): pt1(2) = pt2(2) End If l = l + 1 Loop Close #1 |