Sub Main 'Declare the variable that will reference the application Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True 'Declares Plot as an object Dim Plot As Object Set Plot = SurferApp.Documents.Add 'Creates the first post map Set MapFrame = Plot.Shapes.AddPostMap(SurferApp.Path + "\samples\demogrid.dat") 'Declares PostMap1 as an Object and assigns the post map to variable "PostMap1" Dim PostMap1 As Object Set PostMap1 = MapFrame.Overlays(1) 'Changes the name of the post map to Demo and changes the symbol color. PostMap1.Name = "Demo" PostMap1.Symbol.Color = srfColorGreen 'Creates a second post map Set MapFrame2 = Plot.Shapes.AddPostMap(SurferApp.Path + "\samples\sample1.dat") 'Declares PostMap1 as an Object and assigns the post map to variable "PostMap1" Dim PostMap2 As Object Set PostMap2 = MapFrame2.Overlays(1) 'Changes the name and symbol color of the second post map PostMap2.Name = "Sample" PostMap2.Symbol.Color = srfColorBlue 'Overlays the two post maps Plot.Shapes.SelectAll Set Sel = Plot.Selection Sel.OverlayMaps Sel.DeselectAll 'Turns off the visibility of the second post map Plot.Shapes.Item(1).Overlays("Sample").Visible = False End Sub