API Documentation > CorelDRAW > 2025-v26 > SegmentRange > IVGSegmentRange
SegmentRange.Type property
Gets the segment type, if common within the range
Syntax:
Property Get Type() As cdrSegmentType
Remarks:
The Type property returns a read-only value that is associated with the type of segments in a segment range. The Type property returns a value of cdrSegmentType. If there is a mixture of line and curve segments, a value of cdrMixedSegments is returned.
Examples:
The following VBA example determines whether all segments in the selected shape are curves.
Sub Test()
Dim sgr As SegmentRange
Dim r As VbMsgBoxResult
Set sgr = ActiveShape.Curve.Segments.All
If sgr.Type <> cdrCurveSegment Then
  r = MsgBox("There are some lime segments in the shape." & vbCr & _

 "Do you want to convert them to curves?", vbYesNo)
  If r = vbYes Then sgr.SetType cdrCurveSegment
  Else

 MsgBox "All segments are curves"
  End If

End Sub