Sub Main Debug.Clear 'Initializes Surfer Dim SurferApp, Plot, MapFrame, ContourLayer, MapFrame2, ContourLayer2, ColorScale, ColorScale2 As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True Set Plot = SurferApp.Documents.Add Plot.PageSetup.Orientation = srfLandscape '=============================== 'Variables '=============================== MtoF = 3.28084 zMinM = 25 zMaxM = 100 zIntM = 4 zMinF = zMinM * 3.28084 zMaxF = zMaxM * 3.28084 zIntF = zIntM * 3.28084 '=============================== 'Creates contour map from original grid file (meters) Set MapFrame = Plot.Shapes.AddContourMap(GridFileName:=SurferApp.Path + "\samples\demogrid.grd") Set ContourLayer = MapFrame.Overlays(1) 'Edit the contour layer ContourLayer.LevelMethod = SrfConLevelMethodSimple ContourLayer.SetSimpleLevels(Min:=zMinM, Max:=zMaxM, Interval:=zIntM) ContourLayer.FillContours = True ContourLayer.FillForegroundColorMap.LoadPreset("Rainbow3") ContourLayer.FillForegroundColorMap.SetDataLimits (DataMin:=zMinM, DataMax:=zMaxM) ContourLayer.ShowMajorLabels = False ContourLayer.ShowMinorLabels = False 'Add color scale and edit properties ContourLayer.ShowColorScale=True Set ColorScale = ContourLayer.ColorScale ColorScale.Title = "Elevation" ColorScale.TitlePosition = srfColorScaleTitlePositionTop ColorScale.TitleAngle = 0 ColorScale.TitleOffsetHorizontal = -0.2 ColorScale.LabelFormat.Postfix = " m" ColorScale.Left = 9 'Convert grid file to feet Dim inGrid(1 To 1) As IGridMathInput Set inGrid(1) = SurferApp.NewGridMathInput(SurferApp.Path+"\Samples\demogrid.grd", "A") SurferApp.GridMath2("A* 3.28084" , inGrid, "C:\temp\demogrid_feet.grd") 'Create new contour map Set MapFrame2 = Plot.Shapes.AddContourMap(GridFileName:= "C:\temp\demogrid_feet.grd") Set ContourLayer2 = MapFrame2.Overlays(1) 'Edit contour layer to have the same layer properties as for the other layer ContourLayer2.LevelMethod = SrfConLevelMethodSimple ContourLayer2.SetSimpleLevels(Min:=zMinF, Max:=zMaxF, Interval:=zIntF) 'ContourLayer2.FillContours = True ContourLayer2.FillForegroundColorMap.LoadPreset("Rainbow3") ContourLayer2.FillForegroundColorMap.SetDataLimits (DataMin:=zMinF, DataMax:=zMaxF) 'Add a color scale to the new layer and edit properties ContourLayer2.ShowColorScale=True Set ColorScale2 = ContourLayer2.ColorScale ColorScale2.Title = "" ColorScale2.LabelFormat.Type = srfLabFixed ColorScale2.LabelFormat.NumDigits = 1 ColorScale2.LabelFormat.Postfix = " ft" ColorScale2.Left = 8.4 'Turn off what you don't want to see MapFrame2.Visible = False ContourLayer2.MajorLine.Style = "Invisible" ContourLayer2.MinorLine.Style = "Invisible" ColorScale2.FrameLine.Style = "Invisible" End Sub