SaveFilledGrid2

The SaveFilledGrid2 method saves the filled depressions to a grid file.

Syntax

object.SaveFilledGrid2( FileName, Format, Options)

Parameter

Type

Required/

Optional

Default

Description

FileName

String

Required

This provides the directory path and file name of the pour point file.

Format

SrfGridFormat

Required

This is the grid file format.

Options

String

Optional

""

This provides the output option string for the grid format.

Example 1

This example saves the grid file with filled depressions for the watershed map.

WatershedLayer.SaveFilledGrid2(FileName:="c:\temp\filledGrid.grd", Format:=srfGridFmtS7)

Example 2

This example demonstrates how to save the grid file with the filled depressions and save the spatial references as an Esri AUX.XML file.

Set Doc = Surfer.Documents.Add

Set Map = Doc.Shapes.AddWatershedMap(InGridPath+"Golden.grd")

Map.Overlays.Item(1).SaveFilledGrid2(OutGridPath + "WatershedSaveFilledGrid.grd", Format:=srfGridFmtS7, Options:="UseDefaults=1, ForgetOptions=1, SaveRefInfoAsESRIprj=1, SaveRefInfoAsAUXXML=1")

Used by: WatershedLayer Object