Sub Main

'Initialize Surfer
	Dim SurferApp As Object
	Set SurferApp = CreateObject("Surfer.Application")
	SurferApp.Visible = True
	Dim Plot As Object
	Set Plot = SurferApp.Documents.Add

'======================================
'User-defined variables
'======================================
'Path where grid files are located
filepath = "\\VBOXSVR\VM_Shared\"

'Grid files. If there are more than two, add grid3 = ..., grid4 = ..., etc.
grid1 = "BCU.grd"
grid2 = "Brent.grd"

'Create 2 Points for Profile Line (in map units).
'Adjust number in Dimmed pts (should be odd) and number of rows below as needed.
	Dim pts(3) As Double
	pts(0) = 521421.4 : pts(1) = 6811877.6
	pts(2) = 534224.1 : pts(3) = 6792017.0
'======================================

'Create a contour map and assigns the map frame to the variable "MapFrame"
	Set MapFrame = Plot.Shapes.AddContourMap(filepath+grid1)

'Create another contour map.
'If there are more than two grid files, copy/paste this line, incrementing the 2 in grid2 and MapFrame2
	Set MapFrame2 = Plot.Shapes.AddContourMap(filepath+grid2)

'Overlay maps
	Plot.Shapes.SelectAll
	Set NewMapFrame = Plot.Selection.OverlayMaps

'Create Profile object
	Set Profile = NewMapFrame.Profiles.Add(pts)

End Sub
