Object Model Reference : Classes : S : SegmentRange : Properties : SegmentRange.Type |
Property Type As cdrSegmentType
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.
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 |
Copyright 2013 Corel Corporation. All rights reserved.