' New CamBam VBScript
' create a pointlist, add some points, retrieve the points datas
'****************************************************************

Sub main()

    Dim pl As PointList = New PointList 'a new PointList primitive
    Dim p As Point3F = New Point3F

    'add some points to the point list

    For n As Integer = 0 To 4

        p.X = n * 5
        p.Y = n
        p.Z = -n

        pl.Add(p)   'add the new point to the pointlist

    Next n

    'add the pointlist to the document

    CamBamUI.MainUI.ActiveView.CADFile.Add(pl)


    'read the point datas

    For Each p In pl.Points

        ThisApplication.AddLogMessage(0, p.X & "  " & p.Y & "  " & p.Z)

    Next

End Sub