Previous Document Next Document
NodeRange.Count

Property Count As Long

Member of NodeRange

The Count property returns the number of nodes in the NodeRange object.

The Count property returns a read-only value.

The following code example displays the number of nodes selected with the Shape tool before running the macro:

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 2007 Corel Corporation. All rights reserved.