API Documentation > CorelDRAW > 2025-v26 > Segments > IVGSegments
Segments.AllExcluding method
Creates a range containing all the segments except the ones specified
Syntax:
Function AllExcluding(ByRef ParamArray IndexArray() As Variant) As SegmentRange
Parameters:
Name Type Description
IndexArray
Variant
Remarks:
The AllExcluding method returns a SegmentRange object containing all segments (except for specified segments) from a Segments collection. This method accepts a variable number of arguments. It also accepts arrays.
Examples:
The following VBA example adds a node to the middle of each curve segment except the first three.
Sub Test()
Dim sgr As SegmentRange
Set sgr = ActiveShape.Curve.Segments.AllExcluding(1, 2, 3)
sgr.AddNode 
End Sub