'========================================================================== 'SIZEMOVE.BAS ' 'This script demonstrates the following: ' ' Create a color filled contour map with a color scale ' Move entire map and color scale to lower left portion of page ' '========================================================================== 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") 'Assigns the location of the data and grid files to the variable "Path" Path = SurferApp.Path + "\samples\" 'Makes Surfer visible SurferApp.Visible = True 'Declares Doc as Object Dim Plot As Object 'Creates a plot document in Surfer and assigns it to the variable "Doc" Set Plot = SurferApp.Documents.Add 'Creates a contour map and assigns the map frame to the variable "MapFrame1" Dim MapFrame1 As Object Set MapFrame1 = Plot.Shapes.AddContourMap(GridFileName:=Path+"demogrid.grd") 'Assigns the contour overlay to the variable "ContourMap1" for easier access Dim ContourMap1 As Object Set ContourMap1 = MapFrame1.Overlays(1) 'Color fill the contour map ContourMap1.FillContours = True 'Shows the color scale bar ContourMap1.ShowColorScale = True 'Select contour map and color scale MapFrame1.Selected = True ContourMap1.ColorScale.Selected = True ' Moe the contour map and color scale to lower left of the page Plot.Selection.Left = 1.0 Plot.Selection.Top = 4.0 'Shrink the contour map and color scale equivalent to 'dragging the corners of the object in the user interface Plot.Selection.Width = 3.5 Plot.Selection.Height = 3.0 'Deselect All Plot.Selection.DeselectAll End Sub