AddVertex Method
IntelliCAD 11.1 Object Library | |
AddVertex Method | |
See Also |
- Index
Index where the line segment.
- Point
- The Point object where the new vertex is to be located.
LWPolyline Object : AddVertex Method |
Description
Syntax
Parameters
- Index
Index where the line segment.
- Point
- The Point object where the new vertex is to be located.
Example
' This example creates a light weight polyline in model space.
' It then adds a vertex to the polyline.
Dim myDoc As IntelliCAD.Document
Dim myPline As IntelliCAD.LWPolyline
Dim myPoints As IntelliCAD.points
Dim pt As IntelliCAD.Point
Set myDoc = ActiveDocument
Set myPoints = Library.CreatePoints
Set pt = Library.CreatePoint(6, 2, 0)
myPoints.Add
myPoints(myPoints.Count - 1).x = pt.x
myPoints(myPoints.Count - 1).y = pt.y
myPoints(myPoints.Count - 1).z = pt.z
Set pt = Library.CreatePoint(9, 7, 0)
myPoints.Add
myPoints(myPoints.Count - 1).x = pt.x
myPoints(myPoints.Count - 1).y = pt.y
myPoints(myPoints.Count - 1).z = pt.z
Set myPline = ThisDocument.ModelSpace.AddLightWeightPolyline(myPoints)
myPline.Update
ThisDocument.Application.ZoomAll
Dim newVertex As IntelliCAD.Point
Me.hide
Set newVertex = ThisDocument.Utility.GetPoint(, "Pick a point for a new vertex.")
myPline.AddVertex 2, newVertex
ThisDocument.Application.ZoomAll
End Sub