How to program a continous loop?

Hi everybody,

I am new to Solidworks API. I would like to ask how do I write a loop macro for the following:

I currently have 3Dsketch points in the form of an archimedes spiral. What I have done is to create an axis from point to plane as shown.

the macro for creating the axis is as shown:

Dim swApp As Object

Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long

Sub main()

Set swApp = _
Application.SldWorks

Set Part = swApp.ActiveDoc
Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
boolstatus = Part.Extension.SelectByID2("Point20@3DSketch19", "EXTSKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Plane1", "PLANE", 0, 0, 0, True, 0, Nothing, 0)
boolstatus = Part.InsertAxis2(True)
End Sub

__________________________________________________________________________________

I noticed that I can draw different axis at different points by changing the Point20@3DSketch19 to for example

Point100@3DSketch19. But I want to run a macro that automatically draws an axis for all the points at the 3DSketch.

I have no idea how to start.

Any help would be greatly appreciated.

Regards,

Nuri

SolidworksApi macros