'Blank0.bas replaces the blanking value in a grid file with 0. Sub Main 'Use existing Surfer 7 instance with a Plot1 window. Set surf = GetObject(,"Surfer.application") Set plot = surf.Documents("Plot1") 'Open a new Surfer 7 instance. 'Set surf = CreateObject("Surfer.Application") 'Set plot = surf.Documents.Add(srfDocPlot) surf.Visible=True Set shapes = plot.Shapes Set grid = surf.NewGrid 'grid.LoadFile(surf.Path+"\samples\DemoRectBlank.grd",False) grid.LoadFile(GetFilePath( , "grd",surf.Path+"\samples\","Open Grid File",0),False) Debug.Print "Processing GridRow:" For row=1 To Grid.NumRows() For col=1 To Grid.NumCols() 'If Grid.IsBlanked(row,col) = True Then Grid.SetNode(row,col) = 0 If Grid.IsBlanked(row,col) Then Grid.SetNode(row,col,0) 'Grid.SetNode(row,col) = 0.0 'Grid.SetNode(row,col,0) 'End If Next col Debug.Print row; If row Mod 20 = 0 Then Debug.Print Next row Debug.Print 'CR Grid.SaveFile(surf.Path+"\samples\DemoBlank0.grd", srfGridFmtS7) shapes.AddContourMap(surf.Path+"\samples\DemoBlank0.grd") End Sub