Object Model Reference : Classes : C : Curve : Properties : Curve.Length |
Property Length As Double
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.
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 |
Copyright 2013 Corel Corporation. All rights reserved.