Previous Document Next Document

Object Model Reference : Classes : S : Segments : Properties : Segments.Item


Segments.Item

Property Item(Index As Long) As Segment

Description

Member of Segments

The Item property returns a specified segment (or Segment object).

Item is the default property of the Segments class, and its reference can be omitted when you are accessing items in a Segments collection. For example, Segments.Item(2) is the same as Segments(2) — they both reference the second segment object in the collection.

The Item property returns a read-only value.

Parameter
Description
Index
Specifies the segment by its index number

VBA example

The following VBA example converts all segments in the curve to curve segments.

Sub Test()
 Dim i As Long
 For i = 1 To ActiveShape.Curve.Segments.Count
  ActiveShape.Curve.Segments(i).Type = cdrCurveSegment
 Next i
End Sub
Sub Test()
 Dim seg As Segment
 For Each seg In ActiveShape.Curve.Segments
  seg.Type = cdrCurveSegment
 Next seg
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.