• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

know coordinates of the last freeform node to add more segments

Visor

Member
Forum Dear friends, Greetings
With teacher assistance Hui, I have a way of knowing how many there are in any freeform vector image nodes also do I have the number visible nodes and the number of segments.
I would like to help me get extract value from the last coordinate that is the last node in which you can continue to add more segments.
I appreciate their noble support
 

Attachments

here 'tis

Code:
Sub Get_Last_Coords()
Dim wks As Worksheet
Dim sh
Dim nom As String

nom = Range("D6").Text
Set wks = Worksheets(1)
Set sh = wks.Shapes(nom)

nnodes = sh.Nodes.Count

Debug.Print wks.Shapes(nom).Nodes.Item(nnodes).Points(1, 1) 'x
Debug.Print wks.Shapes(nom).Nodes.Item(nnodes).Points(1, 2) 'y

End Sub
 
Last edited:
Hi ,

This is just BTW.

When using a For ... Next loop with a counter variable , modifying the counter variable within the loop is never done.

If at all you need to use a counter variable and you need to use a loop , look at using the other loop constructs such as Do While ... Loop , Do ... Loop While ...
There are others too.

Narayan
 
Thanks for the collaboration last coordinate effectively achieved, but I do not know used to increase the line.
Because this issue is solved, I prefer to raise a new issue to put it properly

Narayank991 Thanks, I'll take your suggestion into consideration

Narayank991 Thanks, I'll take your suggestion into consideration.

issue is solved
 
Back
Top