Tecnik
05-04-2006, 01:48 AM
Hi there,
I have a several subroutines for moving things round a page and they all work fine, I've posted an example below:-
Sub moveRight()
Selection.ShapeRange.IncrementLeft 7.5
End Sub
I've been trying a number of different ways to apply the same sort of thing to a line node but haven't had any success.
Please can someone tell me if this is possible? I was trying to do something like this:-
Sub movePoint()
Selection.ShapeRange.Nodes(1).IncrementLeft -7.5
End Sub
=====================================================
Update:
Since posting the code above I've come a lot closer to what I want.
Here's the new code:-
Sub movePoint4()
Set Nds = Selection.ShapeRange.Nodes
With Nds
pointsArray = .Item(2).Points
currXvalue = pointsArray(1, 1)
currYvalue = pointsArray(1, 2)
'MsgBox (currXvalue & currYvalue)
.SetPosition 2, currXvalue + 10, currYvalue + 10
End With
End Sub
The problem I'm having now is that the move 10,10 seems to move the node to the position 10,10 on the current page instead of adding 10 to the x and y positional values.
I think this is due to currXvalue and currYvalue being wrong.
Does anyone have any ideas as to why this could be? It's as if the current x and y position are in different units to the move I'm trying to do.
Thanks
Nick
I have a several subroutines for moving things round a page and they all work fine, I've posted an example below:-
Sub moveRight()
Selection.ShapeRange.IncrementLeft 7.5
End Sub
I've been trying a number of different ways to apply the same sort of thing to a line node but haven't had any success.
Please can someone tell me if this is possible? I was trying to do something like this:-
Sub movePoint()
Selection.ShapeRange.Nodes(1).IncrementLeft -7.5
End Sub
=====================================================
Update:
Since posting the code above I've come a lot closer to what I want.
Here's the new code:-
Sub movePoint4()
Set Nds = Selection.ShapeRange.Nodes
With Nds
pointsArray = .Item(2).Points
currXvalue = pointsArray(1, 1)
currYvalue = pointsArray(1, 2)
'MsgBox (currXvalue & currYvalue)
.SetPosition 2, currXvalue + 10, currYvalue + 10
End With
End Sub
The problem I'm having now is that the move 10,10 seems to move the node to the position 10,10 on the current page instead of adding 10 to the x and y positional values.
I think this is due to currXvalue and currYvalue being wrong.
Does anyone have any ideas as to why this could be? It's as if the current x and y position are in different units to the move I'm trying to do.
Thanks
Nick