GridFunction creates a new grid from the specified function. Returns a Boolean. Returns 'True', if the grid is created successfully. Otherwise, returns 'False'. Surfer Beta now allows you to set a specific gird output format when using GridFunction. See below for specifications on how to use the new objects and methods in automation:
IApplication5 object
GridFunction2 - extended from GridFunction to add the following:
Parameter | Type | Required/Optional | Default | Description |
---|---|---|---|---|
OutGridOptions | String | Optional | "" | This provides the output option string for the grid format. |
Example: (OutGridPath on line 5 will need to be updated):
Sub Main Dim Surfer As Object Set Surfer = GetObject(, "Surfer.Application") Set OptionsRefs = "ForgetOptions=1, ValuesPerLine=4, BlankLinePerGridRow=1" Set OutGridPath = "C:\Users\David\Documents\" 'outputs a grid (Surfer 6 Text Grid format) and uses this file type's 'ValuesPerLine' and 'BlankLinePerGridRow' export options Surfer.GridFunction2(Function:="z=x*y", xMin:=0, xMax:=15, xInc:=.5, yMin:=-10, yMax:=10, yInc:=1.5, OutGrid:=OutGridPath + "function.grd", OutFmt:=srfGridFmtAscii, OutGridOptions:=OptionsRefs) End Sub
Updated January 2021
Comments
0 comments
Please sign in to leave a comment.