|   |   | Object Model Reference : Classes : S : Segment : Methods : Segment.Previous | 
Function Previous() As Segment
Member of Segment
The Previous method returns the previous segment on a subpath. If the first segment is reached and the subpath is not closed, Nothing is returned
The following VBA example creates a triangle, converts the three segments to curves, and changes the type of the bottom nodes to smooth, producing a shape resembling a droplet.
| Sub Test() | 
|  Dim s As Shape | 
|  Dim seg As Segment | 
|  Set s = ActiveLayer.CreatePolygon(3, 6, 7, 2, 3) | 
|  s.ConvertToCurves | 
|  s.Curve.Nodes.Range(2, 4, 6).Delete | 
|  Set seg = s.Curve.Segments(2) | 
|  seg.Previous.Type = cdrCurveSegment | 
|  seg.Next.Type = cdrCurveSegment | 
|  seg.Type = cdrCurveSegment | 
|  seg.StartNode.Type = cdrSmoothNode | 
|  seg.EndNode.Type = cdrSmoothNode | 
| End Sub | 
|   |   |   | 
Copyright 2013 Corel Corporation. All rights reserved.