Previous Document Next Document

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


NodeRange.Item

Property Item(Index As Long) As Node

Description

Member of NodeRange

The Item property returns the specified node (or Node object) from a node range (or NodeRange object).

Item is the default property of the NodeRange class, and its reference can be omitted when you are accessing items in a NodeRange collection. For example, NodeRange.Item(2) is the same as NodeRange(2) — they both reference the second node in a node range.

The Item property returns a read-only value.

Parameter
Description
Index
Specifies the node by its index number

VBA example

The following VBA example creates a node range from all nodes in the curve, and it removes all symmetrical and smooth nodes from the range (although it does not delete the nodes from the curve). The remaining collection of cusp nodes is rotated by 30°, relative to its geometric center.

Sub Test()
 Dim nr As NodeRange
 Dim n As Node
 Dim i As Long
 Set nr = ActiveShape.Curve.Nodes.All
 For i = nr.Count To 1 Step -1
  If nr.Item(i).Type <> cdrCuspNode Then nr.Remove i
  ' The same as: If nr(i).Type <> cdrCuspNode Then nr.Remove i
 Next i
 ActiveDocument.ReferencePoint = cdrCenter
 If nr.Count > 0 Then nr.Rotate 30
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.