Previous Document Next Document

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


SegmentRange.Length

Property Length As Double

Description

Member of SegmentRange

The Length property returns the total length, in document units, of all segments in a segment range.

The Length property returns a read-only value.

VBA example

The following VBA example displays the total length of all curve segments in the selected curve.

Sub Test()
 Dim sgr As New SegmentRange
 Dim seg As Segment
 For Each seg In ActiveShape.Curve.Segments
  If seg.Type = cdrCurveSegment Then sgr.Add seg
 Next seg
 MsgBox "All curve segments have total length of " & sgr.Length & """"
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.