Previous Document Next Document

Object Model Reference : Classes : N : NodeRange : Properties : NodeRange.Count


NodeRange.Count

Property Count As Long

Description

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.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.