Private Sub AddLineExample()
' This example creates a line and adds it to the drawing using the AddLine
' method. It then uses the Redraw method to update the screen.
Dim myDoc As IntelliCAD.Document
Dim myLine As IntelliCAD.Line
Set myDoc = Application.ActiveDocument
Set myLine = myDoc.ModelSpace.AddLine(Library.CreatePoint(4, 4), Library.CreatePoint(7, 1))
myLine.Update
ThisDocument.ActiveViewport.ZoomExtents
MsgBox "Line created from 4,4 to 7,1."
' ' The following lines demonstrate another way to create the line.
' Dim myStartPt As IntelliCAD.Point
' Dim myEndPt As IntelliCAD.Point
' Set myStartPt = Library.CreatePoint(4, 4)
' Set myEndPt = Library.CreatePoint(7, 1)
' Set myLine = myDoc.ModelSpace.AddLine(myStartPt, myEndPt)
End Sub