IntelliCAD 11.1 Object Library | |
AddLine Method | |
See Also |
- StartPoint
- A Point object representing the starting point of the line.
- EndPoint
- A Point object representing the ending point of the line.
Block Collection : AddLine Method |
Description
Syntax
Visual Basic |
---|
Public Function AddLine( _ ByVal StartPoint As Point, _ ByVal EndPoint As Point _ ) As Line |
Parameters
- StartPoint
- A Point object representing the starting point of the line.
- EndPoint
- A Point object representing the ending point of the line.
Example
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.Application.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