GridMathInput Object

The GridMathInput object encapsulates the parameters for a single grid when using the GridMath2 command. One or more grids are combined to use the GridMath2 command.

GridMathInput objects are created by the Application.NewGridMathInput method.

The following table provides all properties of the GridMathInput object.

Property

Description

Application

Returns the application object. This is a read-only property.

BlankHandling

This sets the output NoData method to either assign the NoData value to the output or set a Z value for NoData nodes.

GridFileName

This provides the path and file name for the input grid files. This is defined with the NewGridMathInput.

Parent

Returns the Parent object. This is a read-only property.

RemapValue

This sets the value to replace NoData values when BlankHandling is set to srfGMBlankRemap.

VariableName

Sets the variable name for this grid file.

Example 1

This example creates an GridMathInput object and changes the NoData handling and remap value for the grid.

Sub Main

 

'Create the InGrids() array with 1 grid files

Dim InGrids (1 To 1) As GridMathInput

 

Set InGrids(1) = SurferApp.NewGridMathInput(GridFileName:=SurferApp.Path+"\Samples\Sample1c.grd", VariableName:= "A")

'Set the NoData handling to remap NoData values

InGrids(1).BlankHandling = srfGMBlankRemap

 

'Set the remap value to 0

InGrids(1).BlankHandling = 0

 

'Return the file name and variable name to the immediate window

Debug.Print InGrids(1).GridFileName

Debug.Print InGrids(1).VariableName

 

End Sub