📄 gridinfo.bas
字号:
'==========================================================================
'GRIDINFO.BAS
'
'This script demonstrates the following:
'
' How to print out grid information
' Note that you need to have the View | Always Split option checked to
' view the results
'
' SKP 9/99 Surfer 7
'==========================================================================
Sub Main
'Declare the variable that will reference the application
Dim SurferApp As Object
'Creates an instance of the Surfer Application object
' and assigns it to the variable named "SurferApp"
Set SurferApp = CreateObject("Surfer.Application")
'Assigns the location of the data and grid files to the variable "Path"
Path = SurferApp.Path + "\samples\"
'Grid the data file using the current method. This returns False if the grid
' could not be created
If SurferApp.GridData(DataFile:=Path+"demogrid.dat", ShowReport:=False, _
Algorithm:=srfKriging, OutGrid:=Path+"sample.grd") <>True Then Stop
'Create a new grid object and load the created grid
Dim Grid As Object
Set Grid = SurferApp.NewGrid
Grid.LoadFile(Path+"sample.grd", False)
'Print results to the immediate window
Debug.Print Grid.FileName
Debug.Print Grid.xMin
Debug.Print Grid.xMax
Debug.Print Grid.yMin
Debug.Print Grid.yMax
Debug.Print Grid.NumCols
Debug.Print Grid.NumRows
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -