Private Sub Command1_Click() '============================================================================ ' SAMPLE1.BAS ' ' This script demonstrates the following: ' ' For each grid method: ' Grid a sample data file ' Create a contour map ' Print the page. ' ' Original file modified to work with VB4-32 ' '============================================================================ ' Dim strings, objects, and variables Dim objSurf As Object Dim strPath As String Dim intMethod As Integer ' Create the surfer object. Set objSurf = CreateObject("Surfer.App") 'Get Surfer's startup directory strPath = Surf.StartupPath() ' Loop for each grid method For intMethod = 0 To 7 'Open a new drawing document Surf.FileNew ' Grid the data file using the current method If Surf.GridData(Path$ + "\DEMOGRID.DAT", GridMethod:=Method, _ OutGrid:=Path$ + "\SAMPLE") = 0 Then End ' Create a contour map from the grid If Surf.MapContour(Path$ + "\SAMPLE") = 0 Then End ' Uncomment the following line to print the current page 'Surf.FilePrint() Next End Sub