Adds a vertex to a polyline, 3D polyline, or polygon mesh.
Syntax
Sub AppendVertex(Vertex)
Where:
Vertex is a CADopia Point object locating the vertex to be appended.
AppendVertex method example
Sub Example_AppendVertex()
' This example creates a polyline in model space and appends a vertex to it.
Dim myDoc As CADopia.Document
Dim myPline As CADopia.Polyline
Dim myPoints As CADopia.points
Dim pt As CADopia.Point
Set myDoc = ActiveDocument
Set myPoints = Library.CreatePoints
Set pt = Library.CreatePoint(7, 2, 0)
myPoints.Add
myPoints(myPoints.Count).x = pt.x
myPoints(myPoints.Count).y = pt.y
myPoints(myPoints.Count).z = pt.z
Set pt = Library.CreatePoint(9, 8, 0)
myPoints.Add
myPoints(myPoints.Count).x = pt.x
myPoints(myPoints.Count).y = pt.y
myPoints(myPoints.Count).z = pt.z
Set myPline = ThisDocument.ModelSpace.AddPolyline(myPoints)
myPline.Update
ThisDocument.ActiveViewport.ZoomAll
Dim newVertex As CADopia.Point
Me.hide
Set newVertex = ThisDocument.Utility.GetPoint(, "Pick a point for a new vertex.")
myPline.AppendVertex newVertex
ThisDocument.ActiveViewport.ZoomAll
End Sub
Comments