Previous Document Next Document

Object Model Reference : Classes : N : NodeRange : Methods : NodeRange.Move


NodeRange.Move

Sub Move([DeltaX As Double], [DeltaY As Double], [AnchorIndex As Long = 1], [ElasticMode As Boolean = False])

Description

Member of NodeRange

The Move method repositions all nodes in a node range by moving each node by a specified offset.

Parameter
Description
DeltaX
Specifies the horizontal distance to move the nodes. This parameter is optional, and its default value is 0.
DeltaY
Specifies the vertical distance to move the nodes. This parameter is optional, and its default value is 0.
AnchorIndex
Specifies, by index number, the node in the node range to act as an anchor. This parameter is optional, and its default value is 1.
ElasticMode
Specifies whether to use Elastic Mode. If this value is set to True, only the node identified by the AnchorIndex parameter is moved by the exact offset specified, while the remaining nodes are offset by a smaller value depending on their position in the curve. This parameter is optional, and its default value is False.

VBA example

The following VBA example creates a node range from all nodes in the curve except for the first and the last nodes. The nodes are then moved up (vertically) by 1" and moved back down by 1" with Elastic Mode enabled. The middle node (node_count/2) is used as an anchor node in the last operation.

Sub Test()
 Dim crv As Curve
 Dim nr As NodeRange
 Set crv = ActiveShape.Curve
 Set nr = crv.Nodes.AllExcluding(1, crv.Nodes.Count)
 nr.Move 0, 1
 nr.Move 0, -1, nr.Count \ 2, True
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.