'========================================================================== 'MAPSCALE.BAS ' 'This script demonstrates the following: ' ' Create a wireframe and a contour map ' Overlay two maps ' Change the X, Y, and Z scale for the maps ' '========================================================================== 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 Doc As Object 'Creates a plot document in Surfer and assigns it to the variable "Doc" Set Doc = SurferApp.Documents.Add 'Declares MapFrame1 as object Dim MapFrame1 As Object 'Creates a wireframe map and assigns the map frame to the variable "MapFrame1" Set MapFrame1 = Doc.Shapes.AddWireframe(GridFileName:=Path+"demogrid.grd") 'Declares MapFrame2 as object Dim MapFrame2 As Object 'Creates a contour map and assigns the map frame to the variable "MapFrame2" Set MapFrame2 = Doc.Shapes.AddContourMap(GridFileName:=Path+"demogrid.grd") 'Select both Maps MapFrame1.Selected = True MapFrame2.Selected = True 'Overlay the selected maps and save the new map frame Dim MapFrame As Object Set MapFrame = Doc.Selection.OverlayMaps 'Change the map scale MapFrame.xMapPerPU = 0.5 MapFrame.yMapPerPU = 0.5 MapFrame.zMapPerPU = 20 'Declares Plot as Object Dim Plot As Object 'Assigns the first (and only) plot window To the variable "Plot" Set Plot = Doc.Windows(1) 'Change the view so the entire map fits on the screen Plot.Zoom(srfGridZoomFitToWindow) End Sub