Object Model Reference : Classes : N : NodeRange : Properties : NodeRange.Count |
Property Count As Long
Member of NodeRange
The Count property returns the number of nodes in a node range (or NodeRange object).
The Count property returns a read-only value.
The following VBA example displays the number of nodes selected with the Shape tool.
Sub Test() |
Dim nr As NodeRange |
Set nr = ActiveShape.Curve.Selection |
MsgBox nr.Count & " node(s) selected in the curve" |
End Sub |
Sub Test() |
Dim nr As New NodeRange |
Dim n As Node |
Dim ret As VbMsgBoxResult |
For Each n In ActiveShape.Curve.Nodes |
If n.Type = cdrCuspNode Then nr.Add n |
Next n |
If nr.Count = 0 Then |
MsgBox "No cusp nodes found" |
Else |
ret = MsgBox(nr.Count & " cusp nodes found. Do you want to delete them?", vbYesNo) |
If ret = vbYes Then nr.Delete |
End If |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.