API Documentation > CorelDRAW > 2025-v26 > SegmentRange > IVGSegmentRange
SegmentRange.SetType method
Sets the type of all segments
Syntax:
Sub SetType(ByVal Type As cdrSegmentType)
Parameters:
Name Type Description
Type
Remarks:
The SetType method sets the type of segment for all segments in a segment range.
Examples:
The following VBA example converts all segments in the selected shape to curve segments and changes the type of all of its nodes to smooth.
Sub Test()
With ActiveShape.Curve
  .Segments.All.SetType cdrCurveSegment
  .Nodes.All.SetType cdrSmoothNode
End With 
End Sub