2 Function Main() As Integer
3 Dim rc As Integer = Examples.GALIL_EXAMPLE_OK
4 Dim gclib As Gclib = New Gclib()
5 Dim args() As String = Environment.GetCommandLineArgs()
7 If args.Count <> 4 Then
8 Console.WriteLine("Incorrect number of arguments provided")
9 Console.WriteLine("Usage: contour_example.exe <ADDRESS> <FILE A> <FILE B>")
11 Console.Write(vbCrLf + "Press any key to close the example.")
13 Return Examples.GALIL_EXAMPLE_ERROR
16 Dim address As String = args(1) 'Retrieve address from command line
17 Dim fileA As String = args(2) 'Retrieve filepath from command line
18 Dim fileB As String = args(3) 'Retrieve filepath from command line
20 gclib.GOpen(address) 'Open a connection at the provided address
22 'Record user's training and play back training through contour mode
23 rc = Examples.Contour(gclib, fileA, fileB)
25 Examples.PrintError(gclib, ex)
26 rc = Examples.GALIL_EXAMPLE_ERROR
31 Console.Write(vbCrLf + "Press any key to close the example.")