AddLine Example


Sub AddLineExample()
' This example creates a line and adds it to the drawing
' using the AddLine method.
     Dim myLine As AcadLine
     Dim Pt1(0 To 2) As Double
     Dim Pt2(0 To 2) As Double
     Pt1(0) = 4: Pt1(1) = 4: Pt1(2) = 0
     Pt2(0) = 7: Pt2(1) = 1: Pt2(2) = 0
     Set myLine = ThisDrawing.ModelSpace.AddLine(Pt1, Pt2)
     myLine.Update
     ThisDrawing.Application.ZoomExtents
     MsgBox "Line created from 4,4 to 7,1."
End Sub

© Bricsys NV. All rights reserved.