'============================================================================
'  SAMPLE1.BAS
'
'  This script demonstrates the following:
'
'  For each grid method:
'     Grid a sample data file
'     Create a contour map
'     Print the page.
'
'============================================================================

' Create the surfer object.
Set Surf = CreateObject("Surfer.App")

'Get Surfer's startup directory
Path$ = Surf.StartupPath()

' Loop for each grid method
for Method = 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


