'============================================================================ 'BACKGROUND.BAS ' 'This script demonstrates the following: ' Grid a sample data file ' Create a contour map ' Create checkered background color ' ' SKP 9/99 Surfer 7 '============================================================================ Sub Main 'Declare the variable that will reference the application Dim SurferApp As Object 'Creates an instance of the Surfer Application object ' and assigns it to the variable named "SurferApp" Set SurferApp = CreateObject("Surfer.Application") 'Make Surfer visible SurferApp.Visible = True 'Set path Path=SurferApp.Path+"\Samples\" 'Declares Doc As an Object Dim Doc As Object 'Creates a new document with variable name "Doc" Set Doc = SurferApp.Documents.Add 'Grid the data file SurferApp.GridData (DataFile:=path+"demogrid.dat", _ ShowReport:=False, Algorithm:=srfKriging, OutGrid:=path+"sample.grd") 'Declares MapFrame as an Object Dim MapFrame As Object 'Creates a contour map & assigns the map frame to the variable "MapFrame" Set MapFrame = Doc.Shapes.AddContourMap(GridFileName:=Path+"sample.grd") 'Changes the map background MapFrame.BackgroundFill.Pattern = "Diagonal Cross" MapFrame.BackgroundFill.BackColor = srfColorRed MapFrame.BackgroundFill.ForeColor = srfColorIceBlue End Sub