Previous Document Next Document

Object Model Reference : Classes : C : Curve : Properties : Curve.Length


Curve.Length

Property Length As Double

Description

Member of Curve

The Length property returns the total length of a selected curve .

 
The curve calculation is an approximation because the length cannot be calculated with absolute mathematical precision. The precision of the calculation can be set with the Document.CurvePrecision property.

The Length property returns a read-only value.

VBA example

The following VBA example selects a shape object in the active document and determines if that shape is a curve object. If the shape is a curve, a message box displays the length of that curve, in a measurement of inches.

Sub CurveLength()
 Dim s As Shape
 Set s = ActiveSelection.Shapes(1)
 If s.Type = cdrCurveShape Then
  MsgBox "The length of the curve is: " _
  & vbCrLf & s.Curve.Length & " inches"
 End If
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.