Previous Document Next Document

Object Model Reference : Classes : S : SegmentRange : Properties : SegmentRange.Type


SegmentRange.Type

Property Type As cdrSegmentType

Description

Member of SegmentRange

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.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.